Just listened to this talk by Casey Muratori called "Simple Code, High Performance": youtube.com/watch?v=Ge3aKEmZcq…
It's a case study about a piece of code from the game _The Witness_ (actually, from the art editor for that game) which he rewrote with dramatically better performance.
Simple Code, High Performance
Kickstarter link: https://www.kickstarter.com/projects/annarettberg/meow-the-infinite-book-twoThis was a presentation I gave to the University of Twente in e...YouTube
Matt Campbell
in reply to Matt Campbell • • •My summary is that he addressed the original code's poor performance in three stages:
1. He came up with a new algorithm that didn't get progressively slower like the original, and also produced better output.
2. He found that even the new algorithm's inner loop was calling into code that did lots of unnecessary work, including memory allocation, so he instead wrote code that did something much simpler.
3. While he was doing the rewrite for #2, he went ahead and used SIMD.
Matt Campbell
in reply to Matt Campbell • • •