Re:Getting 4 bytes or a full cache line: same speed or not?
by mjw1007 on Thursday August 02, 2018 @03:49AM
(#17669873)
I think those results just show that if you persuade the autovectoriser to work you'll get the same result as for manual SIMD code, as you'd expect.
Re:Getting 4 bytes or a full cache line: same speed or not?
by Const-me on Thursday August 02, 2018 @12:34PM
(#17672841)
Initially, I didn’t know the reason is automatic vectorization. I’ve found the reason and wrote the readme after that comment: https://github.com/Const-me/MemoryAccessCosts/commits/master
Here’s my portable version, scalar-only, C++, and slightly more optimized: https://github.com/Const-me/MemoryAccessCosts
The results are in result-gcc.txt and result-msvc.txt in that repo. They’re from the same PC, I’m using gcc 5.4.0 running in WSL.