Optimizations and performance

Dave via Digitalmars-d digitalmars-d at puremagic.com
Thu Jun 9 07:01:59 PDT 2016


On Thursday, 9 June 2016 at 13:56:37 UTC, Kagamin wrote:
> On Thursday, 9 June 2016 at 13:52:38 UTC, Dave wrote:
>> But it is the point of benchmarking
>
> So it's not "languages should be fast by default", but 
> "benchmarks should be fast by default"?

No. It's languages should be fast by default if you care about 
your language's performance. Benchmarks should be done on the 
more common cases to actually see how your language design 
decisions perform under scrutiny. Otherwise, why not use D's 
inline assembler and you'll probably crush all others. The reason 
is...because that's not what you should be measuring. Nor should 
it be tweaks you make to the common case.

Now I do think it is useful to ask yourself "Ok, can we at least 
get there with the language?", and make the tweaks. But you 
should never forget the case of where your language performed 
using the common case. Unfortunately, I feel people do the tweaks 
and forget the failures discovered during the common case


More information about the Digitalmars-d mailing list