Optimizations and performance

poliklosio via Digitalmars-d digitalmars-d at puremagic.com
Thu Jun 9 00:13:50 PDT 2016


On Wednesday, 8 June 2016 at 22:19:47 UTC, Bauss wrote:
> D definitely needs some optimizations, I mean look at its 
> benchmarks compared to other languages: 
> https://github.com/kostya/benchmarks
>
> I believe the first step towards better performance would be 
> identifying the specific areas that are slow.
>
> I definitely believe D could do much better than what's shown.
>
> Let's find D's performance weaknesses and crack them down.

Please, ignore the non-actionable advice of those who criticise 
benchmarks. :) Benchmarks are the way to go as there is no better 
way to optimize things.
Also, given enough of them, they really **are** representative of 
the typical runtime of any program because the numbers of bugs in 
different language implementations even out over the whole set of 
benchmarks. This is particularly true if the authors of D code 
are familiar with the D way of doing things, but even if its not 
the case, the language shouldn't punish beginners too much for 
writing the simplest solution that could possibly work for them.

I think a much better benchmark for actually optimizing would 
stress performance of D in a comprehensive set of corner cases 
(hundreds), because then, during the optimizations, if you tweak 
something in D to get increased performance in one case and 
accidentally slow something down in another case, you will notice 
that you slowed somthing else down.
I would start with something like this if I was optimizing D.


More information about the Digitalmars-d mailing list