Re:Software optimization resources for C++, assembly, Window...
by H8crilA on Saturday March 07, 2020 @01:27PM
(#22513113)
It is a good point that software has a lot of fat these days, therefore optimization is an easier task (because it's done much more rarely). Windows 98, for however many bugs it had, was so much more responsive.
Even without nonsense O(n^2) accidentally lurking or huge amounts of time going to granular operations depending on something external that has a large latency, there are still usually gratuitous memory allocations and of course pointer chasing.
Taking out allocations from inner loops can easily be a 7x speedup. Taking out pointer chasing, linked lists, virtual pointers etc. and just looping through an array of structs can be another 25x for the areas that use them.
From there it's off to SIMD and multi-threading but I don't expect that from most software.
Interestingly, none of these rely on programming directly in assembly.