All C++ benchmarks

Current benchmark data was generated on Tue Jan 18 2022, full log can be found HERE

CONTRIBUTIONS are WELCOME!

[x86_64][2 cores] Intel(R) Xeon(R) Platinum 8370C CPU @ 2.80GHz

helloworld

Input: QwQ

code time stddev peak-mem mem time(user) time(kernel) compiler compiler/runtime
1.cpp 1.7ms 0.4ms 1.1MB 0ms 0ms clang++ 13.0.1
1.cpp 1.9ms 0.5ms 1.0MB 0ms 0ms g++ 11.2.0

nbody

Input: 5000000

code time stddev peak-mem mem time(user) time(kernel) compiler compiler/runtime
0.cpp 225ms 0.7ms 1.0MB 213ms 0ms g++ 11.2.0
0.cpp 257ms 0.1ms 1.1MB 250ms 0ms clang++ 13.0.1
1.cpp 336ms 0.4ms 1.0MB 327ms 0ms g++ 11.2.0
1.cpp 406ms 1.0ms 1.2MB 397ms 0ms clang++ 13.0.1

Input: 500000

code time stddev peak-mem mem time(user) time(kernel) compiler compiler/runtime
0.cpp 24ms 0.7ms 1.0MB 13ms 0ms g++ 11.2.0
0.cpp 27ms 0.1ms 1.1MB 20ms 0ms clang++ 13.0.1
1.cpp 35ms 0.9ms 1.0MB 27ms 0ms g++ 11.2.0
1.cpp 42ms 1.0ms 1.1MB 30ms 0ms clang++ 13.0.1

Input: 100000

code time stddev peak-mem mem time(user) time(kernel) compiler compiler/runtime
0.cpp 6.6ms 0.7ms 1.0MB 0ms 0ms g++ 11.2.0
0.cpp 7.2ms 0.8ms 1.1MB 0ms 0ms clang++ 13.0.1
1.cpp 8.6ms 0.8ms 1.0MB 0ms 0ms g++ 11.2.0
1.cpp 10ms 0.8ms 1.0MB 0ms 0ms clang++ 13.0.1

nsieve

Input: 12

code time stddev peak-mem mem time(user) time(kernel) compiler compiler/runtime
2.cpp 172ms 10ms 22.0MB 157ms 0ms clang++ 13.0.1
2.cpp 175ms 39ms 22.3MB 163ms 0ms g++ 11.2.0
1.cpp 923ms 30ms 41.6MB 897ms 10ms clang++ 13.0.1
1.cpp 944ms 17ms 41.8MB 917ms 10ms g++ 11.2.0

Input: 10

code time stddev peak-mem mem time(user) time(kernel) compiler compiler/runtime
2.cpp 31ms 0.8ms 7.3MB 23ms 0ms clang++ 13.0.1
2.cpp 33ms 0.9ms 7.7MB 23ms 0ms g++ 11.2.0
1.cpp 121ms 3.8ms 12.2MB 113ms 0ms clang++ 13.0.1
1.cpp 128ms 12ms 12.6MB 113ms 0ms g++ 11.2.0

spectral-norm

Input: 8000

code time stddev peak-mem mem time(user) time(kernel) compiler compiler/runtime
8.cpp 1056ms 0.7ms 3.2MB 2077ms 0ms clang++ 13.0.1
8.cpp 1059ms 2.3ms 1.0MB 2077ms 3ms g++ 11.2.0
7.cpp 1061ms 2.2ms 1.0MB 2087ms 0ms g++ 11.2.0
7.cpp 1065ms 5.8ms 3.2MB 2077ms 0ms clang++ 13.0.1
6.cpp 2229ms 4.5ms 3.0MB 4393ms 0ms clang++ 13.0.1
6.cpp 2283ms 11ms 1.0MB 4497ms 0ms g++ 11.2.0

Input: 4000

code time stddev peak-mem mem time(user) time(kernel) compiler compiler/runtime
7.cpp 269ms 0.7ms 3.2MB 513ms 0ms clang++ 13.0.1
8.cpp 270ms 0.7ms 3.1MB 517ms 0ms clang++ 13.0.1
8.cpp 272ms 2.2ms 1.0MB 520ms 0ms g++ 11.2.0
7.cpp 283ms 7.6ms 1.0MB 523ms 0ms g++ 11.2.0
6.cpp 561ms 0.6ms 3.2MB 1093ms 0ms clang++ 13.0.1
6.cpp 575ms 2.2ms 1.0MB 1120ms 0ms g++ 11.2.0

Input: 1000

code time stddev peak-mem mem time(user) time(kernel) compiler compiler/runtime
8.cpp 19ms 0.2ms 3.2MB 27ms 0ms clang++ 13.0.1
8.cpp 20ms 0.3ms 1.0MB 27ms 0ms g++ 11.2.0
7.cpp 20ms 1.2ms 1.0MB 30ms 0ms g++ 11.2.0
7.cpp 20ms 0.5ms 3.1MB 30ms 0ms clang++ 13.0.1
6.cpp 39ms 0.6ms 3.3MB 63ms 0ms clang++ 13.0.1
6.cpp 40ms 0.8ms 1.0MB 70ms 0ms g++ 11.2.0