← Back to context

Comment by CyberDildonics

4 days ago

Couldn't you create even faster software if you went down another level? Why don't you?

No and if you understood what makes software fast you would know that. Most software is allocating memory inside hot loops and taking that out is extremely easy and can easily be a 7x speedup. Looping through contiguous memory instead of chasing pointers through heap allocated variables is another 25x - 100x speed improvement at least. This is all after switching from a scripting language, which is about a 100x in itself if the language is python.

It isn't about the instructions it is about memory allocation and prefetching.

Sorry but it is absolutely the case that there are optimizations available to someone working in assembly that are not available to someone working in C++.

You are probably a lazy or inexperienced engineer if you choose to work in C++.

In fact, there are optimizations available at the silicon level that are not available in assembly.

You are probably a lazy or inexperienced engineer if you choose to work in assembly.

  • Go ahead and give me examples of what you mean.

    I'm talking about speeding software up by 10x-100x by language choice, then 7x with extremely minimal adjustments (allocate memory outside of hot loops), then 25x - 100x with fairly minimal design changes (use vectors, loop through them straight).

    I'm also not saying people are lazy, I'm saying they don't know that with something like modern C++ and a little bit of knowledge of how to write fast software MASSIVE speed gains are easy to get.

    You are helping make my point here, most programmers don't realize that huge speed gains are low hanging fruit. They aren't difficult, they don't mean anything is contorted or less clear (just the opposite), they just have to stop rationalizing not understanding it.

    I say this with knowledge of both sides of the story instead of guessing based on conventional wisdom.

    • So you agree there’s a trade off between developer productivity and optimization (coding in assembly isn’t worth it, but allocating memory outside of hot loops is)

      You agree with my original point then?

      10 replies →