Comment by z3t4

3 years ago

If you are doing optimizations I would say you need at least a few years experience in the language. You often see people say they switched from language A to language B due to performance, then some guy optimizes the same lib/functions in language A and it gets 10x faster then the optimized version in language B... and people say: Yeh, but that guy has several years of experience. Once you know the layout of the minefield almost all languages are usable and performant.

Depends of the level of maturity of the system. I d agree you need to be a C genius to accelerate the linux kernel a bit, maybe.

But most software aren't the linux kernel, they're small systems solving a class of specific problems as fast as possible with rotating teams, so it sometimes is just a matter of profiling this stupid hashcode function or asking why the mouse is freezing during high trading volume on the C# GUI :D

You wouldnt believe how common optimization problems are and are not related to GC, a belief I have to disprove very often (look 300ms of GC a day, but hey, you're checking an unindexed table each calculation for a trivial non essential decision, what if we fix it)

Eh, there are a few language-specific gotchas, but if you're good at optimization it's really nothing too tricky to figure out within a few weeks. The core problems are the same, depending on the class of language: far from the metal, allocations and GC are almost always what kill you. Close to it, cache misses.

Beyond that, it's just making sure you do less stuff, and being really aggressive with profiling (what looks like it takes the most time in the code almost certainly isn't what's really taking the most time).