(3/10/2003) Here are the shootout benchmarks that have been ported to D so far:
Note that most of these are just quick ports I did. They may not take advantage of D's syntax or be optimized yet.
Below are some benchmark results for Windows. Hardware is a 2.2 Ghz P4M 1GB RAM (Dell C840 laptop), running Windows 2000 Professional SP3.
Would the hash scores for D be about the same as C if it were using something like simple_hash.h?
The ary3 benchmark doesn't show much for semi-fast languages because you're almost always memory bandwidth limited. I may post a read-only version of this test at some point.
msvc settings: /Ox
gcc settings: -O3 -pipe -fomit-frame-pointer -mcpu=pentium3
dmd settings: -O -inline -release
csc settings: /o /unsafe
Times are in seconds
| MSVC7 | GCC | D | C# CSC | C# MONO | |
|---|---|---|---|---|---|
| ackermann (12) | 3.005 | 2.929 | 6.064 | 9.017 | |
| ary3 (1000000) | 9.567 | 10.209 | 9.255 | 9.097 | |
| wc (KJV Bible repeated 40 times) | 1.887 | 1.648 | 1.429 | 3.017 | |
| except (500000) | 2.670 | 5.485 | 2.620 | 7.459 | |
| fibo (42) | 6.597 | 6.762 | 5.910 | 8.051 | |
| hash (1000000) | 1.954 | 2.653 | 14.929 | 3.013 | |
| hash2 (2000) | 4.440 | 4.059 | 32.162 | 21.041 | |
| matrix (100000) | 7.039 | 7.051 | 16.293 | 10.782 | |
| sieve (100000) | 7.513 | 8.194 | 8.564 | 30.864 | |
Here are some benchmark results for Linux:
// DDevil
Serbo-Croatian language by Jovana Milutinovich from WebHostingGeeks.com