Need for speed

Chris Piker chris at hoopjump.com
Thu Apr 1 17:30:15 UTC 2021


On Thursday, 1 April 2021 at 16:52:17 UTC, Nestor wrote:
> I was hoping to beat my dear Python and get similar results to 
> Go, but that is not the case neither using rdmd nor running the 
> executable generated by dmd. I am getting values between 
> 350-380 ms, and 81ms in Python.

Nice test.  I'm new to D as well and can't comment on needed 
refactoring.   To confirm your results I compiled the D example 
using:

```
gdc -O2 speed.d -o speed
```

and measured 129 ms for the D program and 63 ms for the python3 
equivalent.

I'll be keen to see how this plays out since I'm using D as a 
faster alternative to python.


More information about the Digitalmars-d-learn mailing list