News for hackers. Stuff that matters.
Re:What Every Programmer Should Know About Memory (2007) [pdf] by gdy on Tuesday March 05, 2019 @07:24AM (#19310052)
Now you could try to time it with -fno-tree-vectorize or whatever gcc uses nowadays. You might be surprised again :)
Re:What Every Programmer Should Know About Memory (2007) [pdf] by dragontamer on Tuesday March 05, 2019 @01:00PM (#19312540)
Yup yup. SIMD is a CPU-level optimization, but the problem (at size 10,000 x 10,000) is DDR4 memory-limited.

SIMD only really makes a difference at the L1 or L2 cache levels. Its a fancy micro-optimization that compilers do and can improve code speed in those cases...

But the "big" change, going from column-wise traversal into row-wise traversal, is the huge memory optimization that programmers should know about. It just so happens that SIMD-optimizations are also easier for compilers to figure out on row-wise traversal, so you get SIMD-optimization "for free" in many cases.