Investigation: downsides of being generic and correct

Jonathan M Davis jmdavisProg at gmx.com
Fri May 17 02:43:20 PDT 2013


On Thursday, May 16, 2013 12:54:35 Walter Bright wrote:
> On 5/16/2013 12:15 PM, Jonathan M Davis wrote:
> > And if python is faster than
> > D at something, odds are that either the code in question is poorly
> > written or that whatever Phobos functions it's using haven't been
> > properly optimized yet.
> We should also be aware that while Python code itself is slow, its library
> functions are heavily optimized C code. So, if the benchmark consists of
> calling a Python library function, it'll run as fast as any optimized C
> code.

I keep forgetting about that. That's a good thing to keep in mind when 
comparing performance - though part of me thinks that it says very poor things 
about your language if you have to write your code in other languages in order 
to make it fast enough (even if it were only the standard library where that 
happened).

- Jonathan M Davis


More information about the Digitalmars-d mailing list