Julia VS D benchmarks

Current benchmark data was generated on Mon Oct 03 2022, 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.3ms 0.6ms 3.0MB 0ms 0ms ldc2 1.30.0
d 1.d 2.5ms 0.8ms 4.0MB 0ms 0ms dmd 2.100.2
julia 1.jl 194ms 1.0ms 183.0MB 128ms 82ms julia 1.8.2
julia 1.jl 199ms 50ms 173.5MB 118ms 74ms julia/aot 1.8.2

nbody

Input: 5000000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
d 1.d 425ms 0.3ms 1.2MB 420ms 0ms ldc2 1.30.0
d 2.d 435ms 0.7ms 1.2MB 427ms 0ms ldc2 1.30.0
julia 7.jl 547ms 1.5ms 178.3MB 520ms 103ms julia/aot 1.8.2
julia 7.jl 696ms 3.6ms 234.2MB 640ms 133ms julia 1.8.2
d 1.d 1533ms 0.7ms 1.9MB 1520ms 0ms dmd 2.100.2
d 2.d 2679ms 1.8ms 2.0MB 2663ms 0ms dmd 2.100.2

Input: 500000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
d 1.d 46ms 0.6ms 1.2MB 37ms 0ms ldc2 1.30.0
d 2.d 47ms 0.3ms 1.2MB 40ms 0ms ldc2 1.30.0
d 1.d 157ms 0.5ms 2.0MB 150ms 0ms dmd 2.100.2
d 2.d 271ms 0.7ms 1.9MB 257ms 0ms dmd 2.100.2
julia 7.jl 282ms 70ms 179.6MB 210ms 117ms julia/aot 1.8.2
julia 7.jl 396ms 23ms 235.1MB 343ms 120ms julia 1.8.2

nsieve

Input: 12

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
julia 1.jl 421ms 1.7ms 172.8MB 393ms 107ms julia/aot 1.8.2
julia 1.jl 530ms 0.6ms 213.2MB 490ms 117ms julia 1.8.2
d 1.d 618ms 34ms 43.8MB 597ms 10ms ldc2 1.30.0
d 1.d 739ms 71ms 75.2MB 717ms 7ms dmd 2.100.2
d 2.d 860ms 2.3ms 48.6MB 837ms 7ms ldc2 1.30.0
d 2.d 1638ms 0.3ms 78.7MB 1613ms 7ms dmd 2.100.2

Input: 10

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
d 1.d 128ms 1.2ms 13.9MB 110ms 0ms ldc2 1.30.0
d 1.d 140ms 3.9ms 23.5MB 127ms 0ms dmd 2.100.2
d 2.d 204ms 0.6ms 14.9MB 190ms 0ms ldc2 1.30.0
julia 1.jl 244ms 48ms 163.1MB 173ms 100ms julia/aot 1.8.2
julia 1.jl 326ms 1.0ms 206.4MB 300ms 103ms julia 1.8.2
d 2.d 408ms 0.5ms 16.5MB 393ms 0ms dmd 2.100.2

binarytrees

Input: 18

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
julia 4.jl 1108ms 12ms 251.6MB 997ms 190ms julia 1.8.2
d 1.d 3016ms 25ms 75.2MB 3230ms 23ms ldc2 1.30.0
d 1.d 4680ms 29ms 124.4MB 4780ms 17ms dmd 2.100.2

Input: 15

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
d 1.d 266ms 5.5ms 15.2MB 253ms 0ms ldc2 1.30.0
julia 4.jl 303ms 0.3ms 234.5MB 250ms 130ms julia 1.8.2
d 1.d 380ms 9.7ms 16.2MB 370ms 0ms dmd 2.100.2

fannkuch-redux

Input: 11

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
julia 2-m.jl 1780ms 8.9ms 219.0MB 3150ms 117ms julia 1.8.2

Input: 10

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
julia 2-m.jl 529ms 0.8ms 216.8MB 713ms 103ms julia 1.8.2

fasta

Input: 2500000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
d 1.d 203ms 0.5ms 27.7MB 180ms 10ms ldc2 1.30.0
julia 7-m.jl 634ms 1.3ms 291.1MB 913ms 140ms julia 1.8.2
d 1.d 767ms 1.9ms 46.9MB 753ms 7ms dmd 2.100.2

Input: 250000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
d 1.d 24ms 0.5ms 7.2MB 13ms 0ms ldc2 1.30.0
d 1.d 81ms 0.7ms 12.5MB 70ms 0ms dmd 2.100.2
julia 7.jl 455ms 2.3ms 223.5MB 577ms 93ms julia 1.8.2

knucleotide

Input: 2500000_in

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
julia 8.jl 1119ms 4.6ms 274.7MB 1507ms 130ms julia 1.8.2

Input: 250000_in

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
julia 8.jl 768ms 1.7ms 265.5MB 870ms 130ms julia 1.8.2

pidigits

Input: 8000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
julia 3.jl 785ms 1.7ms 189.1MB 737ms 123ms julia 1.8.2
julia 1.jl 1377ms 16ms 274.1MB 1310ms 143ms julia 1.8.2
d 1.d 3411ms 0.5ms 7.9MB 3410ms 13ms ldc2 1.30.0
d 1.d timeout 0.0ms 0.0MB 0ms 0ms dmd 2.100.2

Input: 4000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
julia 3.jl 343ms 0.9ms 188.8MB 310ms 110ms julia 1.8.2
julia 1.jl 789ms 31ms 271.6MB 703ms 143ms julia 1.8.2
d 1.d 807ms 2.2ms 7.9MB 800ms 3ms ldc2 1.30.0
d 1.d 1681ms 5.7ms 8.9MB 1670ms 7ms dmd 2.100.2

spectral-norm

Input: 8000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
julia 2-m.jl 1364ms 1.3ms 198.7MB 2393ms 123ms julia 1.8.2
julia 3-m.jl 2066ms 11ms 214.7MB 3717ms 113ms julia 1.8.2
d 1.d 4594ms 1.9ms 3.8MB 4577ms 0ms ldc2 1.30.0
d 1.d 4786ms 8.0ms 4.5MB 4770ms 0ms dmd 2.100.2

Input: 4000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
julia 2-m.jl 577ms 2.0ms 199.1MB 843ms 120ms julia 1.8.2
julia 3-m.jl 789ms 0.4ms 215.6MB 1217ms 113ms julia 1.8.2
d 1.d 1152ms 0.8ms 3.6MB 1140ms 0ms ldc2 1.30.0
d 1.d 1201ms 3.5ms 4.4MB 1190ms 0ms dmd 2.100.2

Input: 2000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
d 1.d 292ms 0.4ms 3.4MB 277ms 0ms ldc2 1.30.0
d 1.d 303ms 0.6ms 4.2MB 290ms 0ms dmd 2.100.2
julia 2-m.jl 382ms 1.3ms 199.6MB 480ms 103ms julia 1.8.2
julia 3-m.jl 471ms 1.3ms 216.9MB 583ms 127ms julia 1.8.2