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
← March 2021 →
S | M | T | W | T | F | S |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | 6 | |
7 | 8 | 9 | 10 | 11 | 12 | 13 |
14 | 15 | 16 | 17 | 18 | 19 | 20 |
21 | 22 | 23 | 24 | 25 | 26 | 27 |
28 | 29 | 30 | 31 |
Tags
Recent Entries
-
-
-
-
C++: Cache-Friendly Code
on Dec 20 2014 04:51 AM
-
My Blog Links
Recent Comments
Search My Blog
0 user(s) viewing
0 Guests
0 member(s)
0 anonymous member(s)
0 member(s)
0 anonymous member(s)