Slower than Python

John Colvin john.loughran.colvin at gmail.com
Sat Mar 2 04:45:47 PST 2013


On Saturday, 2 March 2013 at 01:10:39 UTC, Walter Bright wrote:
> On 3/1/2013 1:28 PM, cvk012c wrote:
>> But I still kind of disappointed because I expected a much 
>> better performance
>> boost and got only 7%. Counting that Python is not the fastest 
>> scripting
>> language I think that similar Perl and Java scripts will 
>> outperform D easily.
>> Thanks Andrei and simendsjo for a quick response though.
>
> Python's splitter, which you are measuring, isn't written in 
> Python. It is written in C. You're actually comparing a bit of 
> C code with a bit of D code.

This.

If you wrote the splitter in pure python you would see an 
enormous performance gap between it and the D version.

Having said that, maybe there are even more improvements we can 
make to improve speed in that part of photos, but considering 
we're already on a par with some quite mature and optimised C, 
there really isn't a problem.


More information about the Digitalmars-d mailing list