Skip to content

Instantly share code, notes, and snippets.

@kayru
Last active June 25, 2018 08:14
Show Gist options
  • Save kayru/26f1828d08820957b659243b9fa63e82 to your computer and use it in GitHub Desktop.
Save kayru/26f1828d08820957b659243b9fa63e82 to your computer and use it in GitHub Desktop.
Cache benchmark results
iPhone X
sizeLog2: 10 - Data size: 1 KiB (16 cache lines) - Total time: 0.096518 sec - Time/elem: 2.876475 ns -
sizeLog2: 11 - Data size: 2 KiB (32 cache lines) - Total time: 0.098588 sec - Time/elem: 2.938146 ns -
sizeLog2: 12 - Data size: 4 KiB (64 cache lines) - Total time: 0.098571 sec - Time/elem: 2.937641 ns -
sizeLog2: 13 - Data size: 8 KiB (128 cache lines) - Total time: 0.098576 sec - Time/elem: 2.937794 ns -
sizeLog2: 14 - Data size: 16 KiB (256 cache lines) - Total time: 0.098489 sec - Time/elem: 2.935203 ns -
sizeLog2: 15 - Data size: 32 KiB (512 cache lines) - Total time: 0.098492 sec - Time/elem: 2.935303 ns -
sizeLog2: 16 - Data size: 64 KiB (1024 cache lines) - Total time: 0.098705 sec - Time/elem: 2.941644 ns -
sizeLog2: 17 - Data size: 128 KiB (2048 cache lines) - Total time: 0.293225 sec - Time/elem: 8.738775 ns -
sizeLog2: 18 - Data size: 256 KiB (4096 cache lines) - Total time: 0.324969 sec - Time/elem: 9.684835 ns -
sizeLog2: 19 - Data size: 512 KiB (8192 cache lines) - Total time: 0.325974 sec - Time/elem: 9.714777 ns -
sizeLog2: 20 - Data size: 1 MiB (16384 cache lines) - Total time: 0.326145 sec - Time/elem: 9.719872 ns -
sizeLog2: 21 - Data size: 2 MiB (32768 cache lines) - Total time: 0.326217 sec - Time/elem: 9.722027 ns -
sizeLog2: 22 - Data size: 4 MiB (65536 cache lines) - Total time: 0.369315 sec - Time/elem: 11.006442 ns -
sizeLog2: 23 - Data size: 8 MiB (131072 cache lines) - Total time: 0.623044 sec - Time/elem: 18.568152 ns -
sizeLog2: 24 - Data size: 16 MiB (262144 cache lines) - Total time: 2.530460 sec - Time/elem: 75.413595 ns -
sizeLog2: 25 - Data size: 32 MiB (524288 cache lines) - Total time: 3.262286 sec - Time/elem: 97.223710 ns -
sizeLog2: 26 - Data size: 64 MiB (1048576 cache lines) - Total time: 3.810368 sec - Time/elem: 113.557816 ns -
sizeLog2: 27 - Data size: 128 MiB (2097152 cache lines) - Total time: 4.073223 sec - Time/elem: 121.391498 ns -
MacBook Pro 13-inch, 2017, Intel i5, 3.1GHz
sizeLog2: 10 - Data size: 1 KiB (16 cache lines) - Total time: 0.058790 sec - Time/elem: 1.752068 ns - Cycles/elem: 5.424398
sizeLog2: 11 - Data size: 2 KiB (32 cache lines) - Total time: 0.059668 sec - Time/elem: 1.778250 ns - Cycles/elem: 5.505462
sizeLog2: 12 - Data size: 4 KiB (64 cache lines) - Total time: 0.059495 sec - Time/elem: 1.773096 ns - Cycles/elem: 5.489496
sizeLog2: 13 - Data size: 8 KiB (128 cache lines) - Total time: 0.060362 sec - Time/elem: 1.798930 ns - Cycles/elem: 5.569487
sizeLog2: 14 - Data size: 16 KiB (256 cache lines) - Total time: 0.059781 sec - Time/elem: 1.781615 ns - Cycles/elem: 5.515881
sizeLog2: 15 - Data size: 32 KiB (512 cache lines) - Total time: 0.060866 sec - Time/elem: 1.813935 ns - Cycles/elem: 5.615943
sizeLog2: 16 - Data size: 64 KiB (1024 cache lines) - Total time: 0.196352 sec - Time/elem: 5.851742 ns - Cycles/elem: 18.116992
sizeLog2: 17 - Data size: 128 KiB (2048 cache lines) - Total time: 0.196888 sec - Time/elem: 5.867715 ns - Cycles/elem: 18.166446
sizeLog2: 18 - Data size: 256 KiB (4096 cache lines) - Total time: 0.232397 sec - Time/elem: 6.925960 ns - Cycles/elem: 21.442771
sizeLog2: 19 - Data size: 512 KiB (8192 cache lines) - Total time: 0.383889 sec - Time/elem: 11.440780 ns - Cycles/elem: 35.420656
sizeLog2: 20 - Data size: 1 MiB (16384 cache lines) - Total time: 0.440629 sec - Time/elem: 13.131782 ns - Cycles/elem: 40.655996
sizeLog2: 21 - Data size: 2 MiB (32768 cache lines) - Total time: 0.692158 sec - Time/elem: 20.627917 ns - Cycles/elem: 63.864031
sizeLog2: 22 - Data size: 4 MiB (65536 cache lines) - Total time: 1.796109 sec - Time/elem: 53.528231 ns - Cycles/elem: 165.723405
sizeLog2: 23 - Data size: 8 MiB (131072 cache lines) - Total time: 3.114300 sec - Time/elem: 92.813358 ns - Cycles/elem: 287.350159
sizeLog2: 24 - Data size: 16 MiB (262144 cache lines) - Total time: 3.581232 sec - Time/elem: 106.729026 ns - Cycles/elem: 330.433066
sizeLog2: 25 - Data size: 32 MiB (524288 cache lines) - Total time: 3.872646 sec - Time/elem: 115.413856 ns - Cycles/elem: 357.321299
sizeLog2: 26 - Data size: 64 MiB (1048576 cache lines) - Total time: 4.081668 sec - Time/elem: 121.643181 ns - Cycles/elem: 376.607289
sizeLog2: 27 - Data size: 128 MiB (2097152 cache lines) - Total time: 4.290022 sec - Time/elem: 127.852613 ns - Cycles/elem: 395.831693
Platform C (9 instructions/elem)
sizeLog2: 10 - Data size: 1 KiB (16 cache lines) - Total time: 0.246725 sec - Time/elem: 7.352978 ns -
sizeLog2: 11 - Data size: 2 KiB (32 cache lines) - Total time: 0.246736 sec - Time/elem: 7.353309 ns -
sizeLog2: 12 - Data size: 4 KiB (64 cache lines) - Total time: 0.246725 sec - Time/elem: 7.352986 ns -
sizeLog2: 13 - Data size: 8 KiB (128 cache lines) - Total time: 0.246721 sec - Time/elem: 7.352866 ns -
sizeLog2: 14 - Data size: 16 KiB (256 cache lines) - Total time: 0.246726 sec - Time/elem: 7.353018 ns -
sizeLog2: 15 - Data size: 32 KiB (512 cache lines) - Total time: 0.246740 sec - Time/elem: 7.353423 ns -
sizeLog2: 16 - Data size: 64 KiB (1024 cache lines) - Total time: 0.880177 sec - Time/elem: 26.231306 ns -
sizeLog2: 17 - Data size: 128 KiB (2048 cache lines) - Total time: 0.883234 sec - Time/elem: 26.322426 ns -
sizeLog2: 18 - Data size: 256 KiB (4096 cache lines) - Total time: 0.890263 sec - Time/elem: 26.531920 ns -
sizeLog2: 19 - Data size: 512 KiB (8192 cache lines) - Total time: 0.914628 sec - Time/elem: 27.258047 ns -
sizeLog2: 20 - Data size: 1 MiB (16384 cache lines) - Total time: 1.059034 sec - Time/elem: 31.561665 ns -
sizeLog2: 21 - Data size: 2 MiB (32768 cache lines) - Total time: 3.233420 sec - Time/elem: 96.363418 ns -
sizeLog2: 22 - Data size: 4 MiB (65536 cache lines) - Total time: 5.240270 sec - Time/elem: 156.172214 ns -
sizeLog2: 23 - Data size: 8 MiB (131072 cache lines) - Total time: 5.609432 sec - Time/elem: 167.174086 ns -
sizeLog2: 24 - Data size: 16 MiB (262144 cache lines) - Total time: 5.640735 sec - Time/elem: 168.107001 ns -
sizeLog2: 25 - Data size: 32 MiB (524288 cache lines) - Total time: 5.652755 sec - Time/elem: 168.465241 ns -
sizeLog2: 26 - Data size: 64 MiB (1048576 cache lines) - Total time: 5.823206 sec - Time/elem: 173.545059 ns -
sizeLog2: 27 - Data size: 128 MiB (2097152 cache lines) - Total time: 5.878408 sec - Time/elem: 175.190199 ns -
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment