by starmole · 4y ago · 0 comments
On the other hand: How do you teach performance engineering? I learned it in the Demoscene, which was simply a competition. "I can do this effect in 2 cycles less". Not everybody will be a good performance engineer. Or should be! I feel like the people who do good in performance engineering will be competitive and find their win in whatever environment. Maybe that is a good context for the book: That's what people did to win!
However, for most business applications, it doesn’t bring much value. Modern hardware allows a lot of inneficiencies, and having some step few seconds faster or slower won’t matter much. In the last decade I spent maybe a day per year improving performance.
However, when I worked on some mini games recently performance was important since day 1. And I got a lot of joy from that process, programming was fun again!
Even the performance people can argue with me on here when I give them correct advice like that you might not want to try and use all CPU and memory just because they're there.
(For instance because your process is lower priority and so is only scheduled on E-cores and so the # CPUs number you see doesn't actually apply to you.)
Writing a type that automatically becomes SOA vs. AOS is relatively easy in D, almost impossible in C i.e. please stop writing "fast" code in C.
There's a library (which I haven't tried out) for doing this in C++20: https://github.com/celtera/ahsohtoa
(The author is an HN regular, jcelerier.)
Several people have done the entity component system (ECS) thing.
People who are going to be good at it are the kind of people who work that kind of stuff out themselves.