Rdm

Joined 24 August 2022
Line 44:
And then there's OS issues.
 
To simplify this further, though: code which accesses memory sequentially tends to have an order of magnitude speed advantage over code which accesses memory randomly. A rule of thumb here, <u>if you're not prepared to spend a lot of time benchmarking</u>, is that aan algorithmic performance advantage which is not at least a factor of 2 is probably a waste of time. (And, in some contexts -- especially where the underlying system was designed to solve a different problem -- factor of 1000 or greater performance improvements might be practical, for reasons independent of cache management.)
 
Meanwhile, the stuff we do here on rosettacode is pretty much just "dipping our toes in the water". Because of our focus on problems which can be solved by a variety of programmers in a variety of languages, we tend to favor problems which shy away from these performance extremes.
6,951

edits