All C++ benchmarks

Current benchmark data was generated on Fri Jul 01 2022, full log can be found HERE

CONTRIBUTIONS are WELCOME!

[x86_64][2 cores] Intel(R) Xeon(R) Platinum 8171M CPU @ 2.60GHz (Model 85)

* -m in a file name stands for multi-threading or multi-processing

* -i in a file name stands for direct intrinsics usage. (Usage of simd intrinsics via libraries is not counted)

* -ffi in a file name stands for non-stdlib FFI usage

* (You may find time < time(user) + time(sys) for some non-parallelized programs, the overhead is from GC or JIT compiler, which are allowed to take advantage of multi-cores as that's more close to real-world scenarios.)

fannkuch-redux

Input: 11

code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
1-im.cpp 866ms 1.8ms 1.0MB 1620ms 0ms g++ 12.1.0
1-im.cpp 883ms 19ms 3.5MB 1700ms 3ms clang++ 11.0.0

Input: 10

code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
1-im.cpp 84ms 2.5ms 1.0MB 130ms 0ms g++ 12.1.0
1-im.cpp 88ms 5.6ms 3.6MB 140ms 0ms clang++ 11.0.0

helloworld

Input: QwQ

code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
1.cpp 2.4ms 0.7ms 1.1MB 0ms 0ms clang++ 11.0.0
1.cpp 2.9ms 0.8ms 1.0MB 0ms 0ms g++ 12.1.0

nbody

Input: 5000000

code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
0-i.cpp 229ms 8.7ms 1.0MB 217ms 0ms g++ 12.1.0
0-i.cpp 260ms 1.2ms 1.1MB 250ms 0ms clang++ 11.0.0
1.cpp 436ms 4.6ms 1.0MB 420ms 0ms g++ 12.1.0
1.cpp 494ms 6.6ms 1.1MB 480ms 0ms clang++ 11.0.0

Input: 500000

code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
0-i.cpp 25ms 0.5ms 1.0MB 17ms 0ms g++ 12.1.0
0-i.cpp 30ms 0.9ms 1.1MB 17ms 0ms clang++ 11.0.0
1.cpp 47ms 0.6ms 0.9MB 40ms 0ms g++ 12.1.0
1.cpp 55ms 3.5ms 1.1MB 43ms 0ms clang++ 11.0.0

nsieve

Input: 12

code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
1.cpp 469ms 1.4ms 7.5MB 453ms 0ms clang++ 11.0.0
1.cpp 785ms 3.8ms 7.8MB 767ms 0ms g++ 12.1.0

Input: 10

code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
1.cpp 101ms 1.7ms 3.8MB 90ms 0ms clang++ 11.0.0
1.cpp 187ms 10ms 4.0MB 177ms 0ms g++ 12.1.0

spectral-norm

Input: 8000

code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
7-m.cpp 1109ms 16ms 3.0MB 2153ms 0ms clang++ 11.0.0
7-m.cpp 1117ms 13ms 1.0MB 2157ms 0ms g++ 12.1.0
8-m.cpp 1118ms 6.8ms 1.0MB 2157ms 0ms g++ 12.1.0
8-m.cpp 1146ms 40ms 3.2MB 2197ms 3ms clang++ 11.0.0
6-im.cpp 2268ms 18ms 3.2MB 4430ms 3ms clang++ 11.0.0
6-im.cpp 2289ms 8.8ms 1.0MB 4443ms 10ms g++ 12.1.0

Input: 4000

code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
8-m.cpp 290ms 4.0ms 3.2MB 540ms 0ms clang++ 11.0.0
7-m.cpp 293ms 0.2ms 0.9MB 543ms 0ms g++ 12.1.0
8-m.cpp 293ms 5.1ms 2.5MB 543ms 0ms g++ 12.1.0
7-m.cpp 295ms 1.9ms 3.1MB 543ms 0ms clang++ 11.0.0
6-im.cpp 578ms 0.8ms 3.2MB 1110ms 0ms clang++ 11.0.0
6-im.cpp 590ms 11ms 1.0MB 1127ms 0ms g++ 12.1.0

Input: 2000

code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
7-m.cpp 83ms 2.7ms 1.0MB 137ms 0ms g++ 12.1.0
8-m.cpp 83ms 4.2ms 3.2MB 133ms 0ms clang++ 11.0.0
8-m.cpp 84ms 3.7ms 0.9MB 137ms 0ms g++ 12.1.0
7-m.cpp 88ms 6.2ms 3.2MB 143ms 0ms clang++ 11.0.0
6-im.cpp 158ms 2.1ms 1.0MB 280ms 0ms g++ 12.1.0
6-im.cpp 173ms 8.6ms 3.2MB 300ms 0ms clang++ 11.0.0