C++ VS Acton benchmarks

Current benchmark data was generated on Fri Dec 09 2022, full log can be found HERE

CONTRIBUTIONS are WELCOME!

[x86_64][2 cores] Intel(R) Xeon(R) Platinum 8272CL 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

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
cpp 1-im.cpp 660ms 4.1ms 3.9MB 1280ms 0ms clang++ 14.0.0
cpp 1-im.cpp 686ms 12ms 1.3MB 1307ms 0ms g++ 12.2.0

Input: 10

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
cpp 1-im.cpp 63ms 1.1ms 4.1MB 110ms 0ms clang++ 14.0.0
cpp 1-im.cpp 66ms 0.8ms 1.3MB 110ms 0ms g++ 12.2.0

helloworld

Input: QwQ

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
cpp 1.cpp 2.0ms 1.0ms 1.4MB 0ms 0ms clang++ 14.0.0
cpp 1.cpp 2.0ms 0.8ms 1.3MB 0ms 0ms g++ 12.2.0
acton 1.act 5.2ms 3.9ms 3.1MB 0ms 0ms actonc 0.14.2

nbody

Input: 5000000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
cpp 0-i.cpp 183ms 0.7ms 1.3MB 170ms 0ms g++ 12.2.0
cpp 0-i.cpp 209ms 0.5ms 1.4MB 197ms 0ms clang++ 14.0.0
cpp 1.cpp 346ms 6.4ms 1.4MB 333ms 0ms clang++ 14.0.0
cpp 1.cpp 356ms 0.3ms 1.4MB 347ms 0ms g++ 12.2.0

Input: 500000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
cpp 0-i.cpp 21ms 0.7ms 1.4MB 10ms 0ms g++ 12.2.0
cpp 0-i.cpp 23ms 0.1ms 1.4MB 10ms 0ms clang++ 14.0.0
cpp 1.cpp 38ms 0.5ms 1.4MB 30ms 0ms clang++ 14.0.0
cpp 1.cpp 39ms 0.4ms 1.3MB 30ms 0ms g++ 12.2.0

nsieve

Input: 12

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
cpp 1.cpp 641ms 3.7ms 7.8MB 627ms 0ms g++ 12.2.0
cpp 1.cpp 671ms 0.7ms 7.5MB 660ms 0ms clang++ 14.0.0

Input: 10

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
cpp 1.cpp 147ms 0.4ms 4.1MB 137ms 0ms g++ 12.2.0
cpp 1.cpp 152ms 0.3ms 4.0MB 140ms 0ms clang++ 14.0.0

spectral-norm

Input: 8000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
cpp 7-m.cpp 885ms 1.8ms 3.4MB 1727ms 0ms clang++ 14.0.0
cpp 8-m.cpp 886ms 2.1ms 3.4MB 1727ms 0ms clang++ 14.0.0
cpp 7-m.cpp 887ms 1.4ms 1.3MB 1730ms 0ms g++ 12.2.0
cpp 8-m.cpp 888ms 4.4ms 1.3MB 1733ms 0ms g++ 12.2.0
cpp 6-im.cpp 1832ms 3.8ms 1.3MB 3603ms 0ms g++ 12.2.0
cpp 6-im.cpp 1835ms 1.8ms 3.3MB 3603ms 3ms clang++ 14.0.0

Input: 4000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
cpp 8-m.cpp 231ms 0.7ms 3.3MB 423ms 3ms clang++ 14.0.0
cpp 8-m.cpp 231ms 2.3ms 1.3MB 437ms 0ms g++ 12.2.0
cpp 7-m.cpp 233ms 1.8ms 1.3MB 433ms 0ms g++ 12.2.0
cpp 7-m.cpp 233ms 2.6ms 3.4MB 433ms 0ms clang++ 14.0.0
cpp 6-im.cpp 468ms 1.2ms 1.3MB 900ms 0ms g++ 12.2.0
cpp 6-im.cpp 472ms 5.2ms 3.4MB 900ms 0ms clang++ 14.0.0

Input: 2000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
cpp 8-m.cpp 64ms 0.5ms 3.4MB 103ms 0ms clang++ 14.0.0
cpp 7-m.cpp 64ms 0.8ms 3.4MB 110ms 0ms clang++ 14.0.0
cpp 8-m.cpp 65ms 0.7ms 1.3MB 110ms 0ms g++ 12.2.0
cpp 7-m.cpp 66ms 2.7ms 1.3MB 107ms 0ms g++ 12.2.0
cpp 6-im.cpp 126ms 0.3ms 3.3MB 223ms 0ms clang++ 14.0.0
cpp 6-im.cpp 126ms 1.6ms 1.3MB 227ms 0ms g++ 12.2.0