Which code is faster?

Marcus Zetterquist
Floyd Programming Language
1 min readMar 15, 2019

Both functions read and sum 32 MB of data, enough data to force CPU to miss all caches and read from main RAM. Using Google Benchmark to measure.

Computer: iMac 27" Retina 2014, Intel(R) Core(TM) i7–4790K @ 4.00GHz, 16 GB RAM.
CPU Caches:
L1 Data 32K (x4)
L1 Instruction 32K (x4)
L2 Unified 262K (x4)
L3 Unified 8388K (x1)

--

--