Julia VS D benchmarks

Current benchmark data was generated on Thu Jul 13 2023, full log can be found HERE

CONTRIBUTIONS are WELCOME!

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

* -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.)

helloworld

Input: QwQ

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
d 1.d 2.1ms 0.6ms 3.0MB 0ms 0ms ldc2 1.32.2
d 1.d 2.7ms 0.7ms 4.8MB 0ms 0ms dmd 2.104.1
julia 1.jl 200ms 0.6ms 216.9MB 112ms 76ms julia/aot 1.9.2

nbody

Input: 5000000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
d 1.d 413ms 0.6ms 1.5MB 400ms 0ms ldc2 1.32.2
d 2.d 424ms 0.0ms 1.5MB 413ms 0ms ldc2 1.32.2
julia 7.jl 600ms 25ms 223.1MB 523ms 63ms julia/aot 1.9.2
d 1.d 1542ms 2.9ms 2.8MB 1530ms 0ms dmd 2.104.1
d 2.d 2291ms 1.1ms 2.9MB 2280ms 0ms dmd 2.104.1

Input: 500000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
d 1.d 44ms 0.7ms 1.6MB 33ms 0ms ldc2 1.32.2
d 2.d 45ms 0.3ms 1.5MB 37ms 0ms ldc2 1.32.2
d 1.d 157ms 0.7ms 2.9MB 147ms 0ms dmd 2.104.1
d 2.d 237ms 6.9ms 2.9MB 220ms 0ms dmd 2.104.1
julia 7.jl 281ms 4.9ms 223.1MB 193ms 73ms julia/aot 1.9.2

nsieve

Input: 12

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
julia 1.jl 441ms 3.7ms 206.9MB 367ms 60ms julia/aot 1.9.2
d 1.d 562ms 13ms 43.1MB 537ms 10ms ldc2 1.32.2
d 1.d 607ms 7.4ms 75.9MB 587ms 3ms dmd 2.104.1
d 2.d 894ms 1.5ms 48.2MB 870ms 13ms ldc2 1.32.2
d 2.d 1533ms 3.0ms 50.2MB 1513ms 7ms dmd 2.104.1

Input: 10

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
d 1.d 128ms 3.5ms 13.9MB 117ms 0ms ldc2 1.32.2
d 1.d 139ms 1.0ms 23.8MB 127ms 0ms dmd 2.104.1
d 2.d 212ms 0.9ms 15.0MB 200ms 0ms ldc2 1.32.2
julia 1.jl 236ms 5.2ms 200.7MB 150ms 70ms julia/aot 1.9.2
d 2.d 380ms 1.6ms 17.3MB 363ms 0ms dmd 2.104.1