I have been working on a mathematical optimization project in C++ for quite some time now. While working with matrices and calculations, something caught my attention: the importance of contiguous memory allocation and writing cache-friendly code.
To be honest, until now, I haven't studied technical details of CPU structures except from some general knowledge. Today I was reading about caching in CPUs and how it can be exploited to improve performance and found this brilliant explanation.
To be honest, until now, I haven't studied technical details of CPU structures except from some general knowledge. Today I was reading about caching in CPUs and how it can be exploited to improve performance and found this brilliant explanation.
6 Comments On This Entry
Page 1 of 1

CTphpnwb
27 December 2014 - 07:13 AM
Yes, good post. I'm curious as to how this has affected your project.

CTphpnwb
30 December 2014 - 06:58 AM
Have you tried it on multidimensional arrays (more than 2) with varying sizes in each dimension? Something like Arr[10][20][30][40][50] would be a good test if you can do it.
Page 1 of 1
Tags
Recent Entries
-
-
-
-
C++: Cache-Friendly Code
on Dec 20 2014 04:51 AM
-
My Blog Links
Recent Comments
Search My Blog
4 user(s) viewing
4 Guests
0 member(s)
0 anonymous member(s)
0 member(s)
0 anonymous member(s)