Open baiwfg2 opened 10 months ago
What could be the possible reason ? When size=32*1024*1024
, neighboring pointers point to logically neighboring memory addresses. Isn't the case under size=64*1024*1024
?
The reason is weird. Look at time spent in system time. That is the kernel doing services for us. It should be very low, but in your case it's huge. My best guess is that your program has started to swap memory to disk. Use strace
to understand what system calls are being done.
Hi. I like this article https://johnnysswlab.com/faster-hash-maps-binary-trees-etc-through-data-layout-modification/
I try it by self and find interesting results.
compile:
clang++ -DLIKWID_PERFMON -O3 -std=c++17 -g array_of_pointers.cpp -I ../common -fopenmp
On fedora, clang 15 within virtualbox,
The results are very similar to yours in the article. But here is
a.out 64
:The low fragmentation case is now much slower, even worse than the high fragmentation case. I also run it on Kali linux,clang 16, and it's the same result.