To begin in D coming from Python
bearophile
bearophileHUGS at lycos.com
Thu Jul 24 03:37:17 PDT 2008
Jesse Phillips:
> On a note of when bearophile said that if you write code as you do in
> Python, you only get about Python speed. I'm not sure how close to the
> "Python" construct he is referring, but through my lack of experience
> with speed comparisons, if you right code that follows the D "style" you
> should see good performance. Hopefully bearophile or someone else will
> correct me if this is off base.
>From my experience if you write code in Python style (using my libs, mostly) you often have code that is about 1.5-4 times faster than the Python one.
As you say, if you program in a "D" style the speed can be quite higher.
Finally if you program in C style, the speed is generally only 1-10 times of the C, on average about 2 time slower in many small programs I have written :-)
Here you can find a discussion about a similar topic, in the zip you can find three D versions that show you what I am talking about (but here the D C-style version is about as fast as the D D-style version):
http://leonardo-m.livejournal.com/66171.html
Bye,
bearophile
More information about the Digitalmars-d
mailing list