Chapel VS D benchmarks

Current benchmark data was generated on Mon Mar 31 2025, full log can be found HERE

CONTRIBUTIONS are WELCOME!

[x86_64][4 cores] AMD EPYC 7763 64-Core Processor (Model 1)

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

binarytrees

Input: 18

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
d 1.d 1796ms 23ms 312.6MB 1763ms 37ms ldc2 1.40.1
chapel 4.chpl 1962ms 44ms 60.3MB 1950ms 0ms chpl 1.31.0
chapel 3.chpl 2019ms 12ms 60.3MB 2010ms 0ms chpl 1.31.0
d 1.d 2658ms 12ms 314.7MB 2843ms 40ms dmd 2.110.0

Input: 15

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
d 1.d 163ms 2.1ms 209.9MB 137ms 13ms ldc2 1.40.1
chapel 4.chpl 185ms 1.2ms 32.4MB 180ms 0ms chpl 1.31.0
chapel 3.chpl 188ms 2.8ms 32.4MB 180ms 0ms chpl 1.31.0
d 1.d 229ms 3.0ms 212.0MB 200ms 10ms dmd 2.110.0

coro-prime-sieve

Input: 4000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
chapel 1-m.chpl 2192ms 58ms 470.2MB 4273ms 73ms chpl 1.31.0
d 1.d timeout 0.0ms 18.0MB 4970ms 17ms dmd 2.110.0
d 1.d timeout 0.0ms 16.5MB 4967ms 20ms ldc2 1.40.1

Input: 1000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
chapel 1-m.chpl 181ms 1.3ms 427.0MB 293ms 37ms chpl 1.31.0
d 1.d 1026ms 5.0ms 12.3MB 1000ms 13ms ldc2 1.40.1
d 1.d 1314ms 5.4ms 14.5MB 1293ms 10ms dmd 2.110.0

edigits

Input: 250001

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
chapel 1.chpl 71ms 3.7ms 32.4MB 70ms 0ms chpl 1.31.0
d 1.d 2552ms 5.3ms 8.1MB 2543ms 0ms ldc2 1.40.1
d 1.d 2909ms 4.5ms 10.2MB 2897ms 3ms dmd 2.110.0

Input: 100000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
chapel 1.chpl 32ms 1.2ms 30.5MB 30ms 0ms chpl 1.31.0
d 1.d 451ms 9.4ms 8.1MB 440ms 0ms ldc2 1.40.1
d 1.d 527ms 1.2ms 10.2MB 517ms 0ms dmd 2.110.0

fasta

Input: 2500000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
chapel 5-m.chpl 104ms 1.2ms 28.4MB 190ms 0ms chpl 1.31.0
d 1.d 193ms 1.0ms 49.2MB 180ms 3ms ldc2 1.40.1
d 1.d 624ms 3.3ms 49.1MB 613ms 3ms dmd 2.110.0

Input: 250000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
chapel 5.chpl 22ms 2.2ms 28.4MB 20ms 0ms chpl 1.31.0
d 1.d 24ms 0.4ms 11.1MB 17ms 0ms ldc2 1.40.1
d 1.d 67ms 0.6ms 13.1MB 60ms 0ms dmd 2.110.0

helloworld

Input: QwQ

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
d 1.d 1.8ms 0.1ms 2.9MB 0ms 0ms ldc2 1.40.1
d 1.d 2.2ms 0.3ms 5.0MB 0ms 0ms dmd 2.110.0
chapel 1.chpl 11ms 0.5ms 28.8MB 0ms 0ms chpl 1.31.0

knucleotide

Input: 2500000_in

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
d 1-m.d 671ms 8.6ms 47.3MB 2010ms 17ms ldc2 1.40.1
chapel 3-m.chpl 746ms 3.8ms 97.0MB 1413ms 10ms chpl 1.31.0
d 1-m.d 1945ms 21ms 49.5MB 5917ms 17ms dmd 2.110.0

Input: 250000_in

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
d 1-m.d 86ms 1.5ms 39.7MB 243ms 7ms ldc2 1.40.1
chapel 3-m.chpl 112ms 0.7ms 76.9MB 197ms 3ms chpl 1.31.0
d 1-m.d 210ms 11ms 41.1MB 620ms 7ms dmd 2.110.0

nbody

Input: 5000000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
chapel 2.chpl 319ms 3.7ms 28.8MB 313ms 0ms chpl 1.31.0
d 1.d 361ms 1.4ms 2.9MB 350ms 0ms ldc2 1.40.1
d 2.d 364ms 3.8ms 2.9MB 353ms 0ms ldc2 1.40.1
d 1.d 684ms 1.4ms 4.6MB 673ms 0ms dmd 2.110.0
d 2.d 2033ms 2.7ms 4.6MB 2023ms 0ms dmd 2.110.0

Input: 500000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
d 2.d 38ms 0.3ms 2.9MB 30ms 0ms ldc2 1.40.1
d 1.d 39ms 0.2ms 2.9MB 30ms 0ms ldc2 1.40.1
chapel 2.chpl 45ms 0.9ms 28.9MB 40ms 0ms chpl 1.31.0
d 1.d 80ms 15ms 4.6MB 70ms 0ms dmd 2.110.0
d 2.d 207ms 1.5ms 4.6MB 193ms 0ms dmd 2.110.0

pidigits

Input: 8000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
chapel 2.chpl 442ms 11ms 30.3MB 437ms 0ms chpl 1.31.0
d 1.d 2429ms 4.7ms 8.1MB 2357ms 440ms ldc2 1.40.1
d 1.d 4342ms 20ms 10.2MB 4310ms 447ms dmd 2.110.0

Input: 4000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
chapel 2.chpl 113ms 0.5ms 30.4MB 110ms 0ms chpl 1.31.0
d 1.d 578ms 1.1ms 8.0MB 553ms 100ms ldc2 1.40.1
d 1.d 1026ms 2.5ms 10.2MB 990ms 123ms dmd 2.110.0

regex-redux

Input: 2500000_in

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
d 3.d 577ms 2.9ms 171.9MB 760ms 17ms ldc2 1.40.1
d 3.d 1297ms 1.7ms 172.8MB 1497ms 13ms dmd 2.110.0
chapel 3.chpl 1382ms 4.7ms 222.1MB 1337ms 37ms chpl 1.31.0

Input: 250000_in

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
d 3.d 64ms 4.3ms 25.1MB 77ms 0ms ldc2 1.40.1
d 3.d 137ms 3.3ms 30.4MB 150ms 0ms dmd 2.110.0
chapel 3.chpl 159ms 3.1ms 48.9MB 140ms 10ms chpl 1.31.0

secp256k1

Input: 2000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
chapel 1.chpl 1172ms 4.9ms 29.2MB 1167ms 0ms chpl 1.31.0
d 1.d 4833ms 87ms 4.3MB 4803ms 357ms ldc2 1.40.1
d 1.d timeout 0.0ms 6.4MB 4937ms 307ms dmd 2.110.0

Input: 500

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
chapel 1.chpl 314ms 9.4ms 29.2MB 310ms 0ms chpl 1.31.0
d 1.d 1201ms 6.5ms 4.0MB 1190ms 83ms ldc2 1.40.1
d 1.d 2084ms 6.8ms 6.6MB 2040ms 137ms dmd 2.110.0

spectral-norm

Input: 8000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
chapel 1-m.chpl 1917ms 12ms 28.9MB 3807ms 0ms chpl 1.31.0
d 1.d 3594ms 3.1ms 3.9MB 3583ms 0ms ldc2 1.40.1
d 1.d 3637ms 18ms 8.3MB 3630ms 0ms dmd 2.110.0
chapel 1.chpl 3719ms 32ms 28.8MB 3710ms 0ms chpl 1.31.0

Input: 4000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
chapel 1-m.chpl 489ms 4.6ms 29.0MB 953ms 0ms chpl 1.31.0
d 1.d 901ms 0.5ms 3.4MB 890ms 0ms ldc2 1.40.1
d 1.d 923ms 4.7ms 5.3MB 913ms 0ms dmd 2.110.0
chapel 1.chpl 934ms 6.5ms 28.8MB 927ms 0ms chpl 1.31.0

Input: 2000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
chapel 1-m.chpl 134ms 2.1ms 28.9MB 240ms 0ms chpl 1.31.0
d 1.d 228ms 0.9ms 3.1MB 220ms 0ms ldc2 1.40.1
d 1.d 233ms 1.6ms 4.9MB 223ms 0ms dmd 2.110.0
chapel 1.chpl 248ms 6.1ms 28.8MB 243ms 0ms chpl 1.31.0