Speed kills

ixid via Digitalmars-d digitalmars-d at puremagic.com
Tue Mar 8 06:14:25 PST 2016


On Monday, 15 February 2016 at 13:51:38 UTC, ixid wrote:
> Every time there is a D thread on reddit it feels like the new 
> user is expecting mind-blowing speed from D.
>
> https://www.reddit.com/r/programming/comments/45v03g/porterstemmerd_an_implementation_of_the_porter/
>
> This is the most recent one where John Colvin provided some 
> pointers to speed it up significantly. Walter has done some 
> good work taking the low-hanging fruit to speed up DMD code and 
> there is a lot of effort going on with reference counting 
> machinery but I wondered if some of the common errors people 
> make that slow down D code can be addressed?
>
> Literals used to be a hidden speed bump but I think that was 
> improved, now the append operator is one of the most common 
> culprits, can this not be enhanced behind the scenes to work 
> more like append? Do others notice common pitfalls between the 
> article code and what the D community then suggests where we 
> can bridge the gap so naive users get faster code?

Since I posted this thread I've learned std.algorithm.sum is 4 
times slower than a naive loop sum. Even if this is for reasons 
of accuracy this is exactly what I am talking about- this is a 
hidden iceberg of terrible performance that will reflect poorly 
on D. That's so slow the function needs a health warning.


More information about the Digitalmars-d mailing list