4 ms·
One clarification: "Just by moving data around, by carefully storing it in one place, we can get huge performance speed up." should really be: Just by moving
by al2o3cr 12y ago
One clarification: "Just by moving data around, by carefully storing it in one place, we can get huge performance speed up."
should really be:
Just by moving data around, by carefully storing it in one place, and by not doing anything else that messes up caching or consumes CPU cycles we can get huge performance speed up.
A microbenchmark like this will always show results that are unattainable in practice; the work in real code is likely to take considerably more time than the fetch.
- taeric 12y agoTo be fair, if you have your data setup in such a way that you know what is coming next, prefetching is a very viable strategy. That is, this might not be as unobtainable as you seem to be implying. There was a great presentation by someone in the gaming community about this. I can't find it right off, but at a glance this[1] article seems pretty good. And is basically this idea. [1] http://gameprogrammingpatterns.com/data-locality.html http://gameprogrammingpatterns.com/data-locality.html
- munificent 12y ago> There was a great presentation by someone in the gaming community about this. You're probably thinking of Tony Albrecht's fantastic "Pitfalls of Object-Oriented Programming" talk which is referenced by (and inspired!) the chapter: http://research.scee.net/files/presentations/gcapaustralia09/Pitfalls_of_Object_Oriented_Programming_GCAP_09.pdf http://research.scee.net/files/presentations/gcapaustralia09...
- taeric 12y agoThat is indeed what I saw. Thanks for posting!