Why D
D was designed as a "better C++" — it keeps C-compatible performance while adding GC, modules, and modern features. It occupies a unique space between systems languages (C, C++, Rust) and managed languages (Java, Go). Benchmarking it would show whether the GC overhead is measurable in compute-heavy workloads.
Key considerations
- GC by default but supports manual memory management via
@nogc
- Benchmark should use default GC mode for fairness (like Go)
- Three compilers: DMD (reference, fast compile), LDC (LLVM backend, faster output), GDC (GCC backend)
- LDC is the recommended compiler for performance benchmarks
ldc2 -O -release for optimized builds
- C-like syntax — implementations should be straightforward ports from C++
Implementation
Implement all 7 benchmark algorithms following the reference implementations (PHP, C++, Python):
Setup:
Why D
D was designed as a "better C++" — it keeps C-compatible performance while adding GC, modules, and modern features. It occupies a unique space between systems languages (C, C++, Rust) and managed languages (Java, Go). Benchmarking it would show whether the GC overhead is measurable in compute-heavy workloads.
Key considerations
@nogcldc2 -O -releasefor optimized buildsImplementation
Implement all 7 benchmark algorithms following the reference implementations (PHP, C++, Python):
Setup:
langs/d/benchmark.ymldocker/d/Dockerfile