Chapel VS D benchmarks

Current benchmark data was generated on Thu May 01 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 1779ms 14ms 312.5MB 1757ms 30ms ldc2 1.40.1
chapel 4.chpl 1953ms 5.8ms 62.4MB 1947ms 0ms chpl 1.31.0
chapel 3.chpl 2034ms 5.7ms 62.3MB 2027ms 0ms chpl 1.31.0
d 1.d 3014ms 3.4ms 315.0MB 3180ms 50ms dmd 2.111.0

Input: 15

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
d 1.d 164ms 0.4ms 207.9MB 130ms 20ms ldc2 1.40.1
chapel 4.chpl 184ms 0.5ms 32.3MB 180ms 0ms chpl 1.31.0
chapel 3.chpl 189ms 2.4ms 32.3MB 183ms 0ms chpl 1.31.0
d 1.d 263ms 2.3ms 210.0MB 230ms 20ms dmd 2.111.0

coro-prime-sieve

Input: 4000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
chapel 1-m.chpl 2236ms 75ms 571.9MB 4350ms 80ms chpl 1.31.0
d 1.d timeout 0.0ms 17.8MB 4967ms 20ms dmd 2.111.0
d 1.d timeout 0.0ms 16.9MB 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 193ms 3.2ms 540.5MB 307ms 50ms chpl 1.31.0
d 1.d 1032ms 3.6ms 12.3MB 1013ms 10ms ldc2 1.40.1
d 1.d 1375ms 5.4ms 12.2MB 1357ms 10ms dmd 2.111.0

edigits

Input: 250001

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
chapel 1.chpl 74ms 1.0ms 32.5MB 70ms 0ms chpl 1.31.0
d 1.d 2553ms 5.1ms 8.1MB 2537ms 0ms ldc2 1.40.1
d 1.d 2867ms 3.5ms 10.5MB 2853ms 3ms dmd 2.111.0

Input: 100000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
chapel 1.chpl 34ms 0.7ms 30.5MB 30ms 0ms chpl 1.31.0
d 1.d 442ms 1.8ms 8.1MB 430ms 0ms ldc2 1.40.1
d 1.d 519ms 3.3ms 10.4MB 510ms 0ms dmd 2.111.0

fasta

Input: 2500000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
chapel 5-m.chpl 107ms 2.2ms 28.4MB 190ms 0ms chpl 1.31.0
d 1.d 155ms 1.8ms 2.9MB 143ms 0ms ldc2 1.40.1
d 1.d 641ms 1.0ms 4.8MB 630ms 0ms dmd 2.111.0

Input: 250000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
d 1.d 18ms 1.4ms 2.9MB 10ms 0ms ldc2 1.40.1
chapel 5.chpl 21ms 1.7ms 28.4MB 20ms 0ms chpl 1.31.0
d 1.d 68ms 1.6ms 4.8MB 60ms 0ms dmd 2.111.0

helloworld

Input: QwQ

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
d 1.d 1.6ms 0.1ms 3.0MB 0ms 0ms ldc2 1.40.1
d 1.d 2.0ms 0.2ms 5.1MB 0ms 0ms dmd 2.111.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 663ms 47ms 56.3MB 2020ms 10ms ldc2 1.40.1
chapel 3-m.chpl 751ms 2.2ms 85.0MB 1420ms 10ms chpl 1.31.0
d 1-m.d 1909ms 21ms 50.0MB 5543ms 10ms dmd 2.111.0

Input: 250000_in

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
d 1-m.d 83ms 2.5ms 37.4MB 237ms 13ms ldc2 1.40.1
chapel 3-m.chpl 116ms 1.0ms 87.0MB 200ms 7ms chpl 1.31.0
d 1-m.d 203ms 17ms 41.7MB 617ms 17ms dmd 2.111.0

nbody

Input: 5000000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
chapel 2.chpl 324ms 3.1ms 28.8MB 320ms 0ms chpl 1.31.0
d 1.d 362ms 1.3ms 2.9MB 350ms 0ms ldc2 1.40.1
d 2.d 362ms 0.9ms 2.9MB 350ms 0ms ldc2 1.40.1
d 1.d 680ms 3.0ms 4.8MB 670ms 0ms dmd 2.111.0
d 2.d 2030ms 3.5ms 4.8MB 2023ms 0ms dmd 2.111.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.3ms 2.9MB 30ms 0ms ldc2 1.40.1
chapel 2.chpl 45ms 1.4ms 28.8MB 40ms 0ms chpl 1.31.0
d 1.d 72ms 0.8ms 4.8MB 60ms 0ms dmd 2.111.0
d 2.d 207ms 0.5ms 4.6MB 200ms 0ms dmd 2.111.0

pidigits

Input: 8000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
chapel 2.chpl 448ms 1.7ms 30.4MB 440ms 0ms chpl 1.31.0
d 1.d 2424ms 9.2ms 8.2MB 2347ms 457ms ldc2 1.40.1
d 1.d 4427ms 6.8ms 10.4MB 4383ms 480ms dmd 2.111.0

Input: 4000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
chapel 2.chpl 114ms 1.1ms 30.3MB 110ms 0ms chpl 1.31.0
d 1.d 583ms 2.0ms 8.0MB 550ms 120ms ldc2 1.40.1
d 1.d 1050ms 5.7ms 10.4MB 1037ms 110ms dmd 2.111.0

regex-redux

Input: 2500000_in

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
d 3.d 577ms 8.3ms 170.0MB 757ms 23ms ldc2 1.40.1
d 3.d 1199ms 3.1ms 175.2MB 1383ms 27ms dmd 2.111.0
chapel 3.chpl 1396ms 9.5ms 220.2MB 1350ms 40ms chpl 1.31.0

Input: 250000_in

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
d 3.d 62ms 0.6ms 26.0MB 70ms 0ms ldc2 1.40.1
d 3.d 128ms 3.2ms 31.4MB 137ms 7ms dmd 2.111.0
chapel 3.chpl 162ms 3.8ms 48.9MB 140ms 17ms chpl 1.31.0

secp256k1

Input: 2000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
chapel 1.chpl 1187ms 11ms 29.1MB 1183ms 0ms chpl 1.31.0
d 1.d 4796ms 12ms 4.1MB 4743ms 397ms ldc2 1.40.1
d 1.d timeout 0.0ms 6.6MB 4980ms 280ms dmd 2.111.0

Input: 500

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
chapel 1.chpl 307ms 3.0ms 29.0MB 303ms 0ms chpl 1.31.0
d 1.d 1201ms 3.7ms 4.0MB 1177ms 100ms ldc2 1.40.1
d 1.d 2057ms 8.9ms 6.5MB 2023ms 133ms dmd 2.111.0

spectral-norm

Input: 8000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
chapel 1-m.chpl 1928ms 23ms 28.9MB 3827ms 0ms chpl 1.31.0
d 1.d 3595ms 8.5ms 4.0MB 3583ms 0ms ldc2 1.40.1
d 1.d 3629ms 18ms 6.3MB 3620ms 0ms dmd 2.111.0
chapel 1.chpl 3719ms 13ms 28.8MB 3713ms 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 492ms 2.8ms 28.8MB 960ms 0ms chpl 1.31.0
d 1.d 901ms 1.9ms 3.5MB 890ms 0ms ldc2 1.40.1
d 1.d 923ms 7.1ms 5.3MB 913ms 0ms dmd 2.111.0
chapel 1.chpl 944ms 3.9ms 28.8MB 937ms 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 1.5ms 28.9MB 247ms 0ms chpl 1.31.0
d 1.d 228ms 0.9ms 3.1MB 220ms 0ms ldc2 1.40.1
d 1.d 233ms 1.4ms 4.9MB 220ms 0ms dmd 2.111.0
chapel 1.chpl 247ms 2.2ms 28.8MB 240ms 0ms chpl 1.31.0