Article: Increasing the D Compiler Speed by Over 75%

JS js.mdnq at gmail.com
Mon Jul 29 13:32:36 PDT 2013


On Monday, 29 July 2013 at 19:38:51 UTC, Walter Bright wrote:
> On 7/29/2013 12:08 PM, JS wrote:
>> Trying to use distance and speed as a measure of performance 
>> of a program is
>> just ridiculous.
>
> If you google "program execution speed" you'll find it's a 
> commonly used term. "Lines per second" is a common measure of 
> compiler execution speed - google "compiler lines per second" 
> and see.
>
>
>> (again, if we started with 12 second and went to 21 seconds, 
>> it would be a near
>> 75% increase. But a 75% increase is not a 75% decrease!!!!!!!!)
>
> Speed is the reciprocal of time, meaning a decrease in time is 
> an increase in speed.

You are right, sorry. There is no difference.

I think the issue is interpretation. When I read "X% increase in 
speed" I think "X% faster [in time]".

Since you are using speed in a technical way, then it works. I 
think it is deceptive, in some sense... although not necessarily 
intentional.

The reason is very few people measure performance of a program in 
any other way than the time it takes to execute the program. That 
is all that matters in most cases... and in most cases lines per 
second mean nothing... but I guess in compilers it is more useful.


What I'm now wondering is why you chose to use % increase in 
speed rather than % decrease in time? Is it because it is a 
larger number and looks more impressive?

It think 99.9999% of people using D only care about the absolute 
time it takes to compile their code, and giving a number that 
they can actually use directly(instead of having to calculate 
first) seems more useful.

By knowing you *sped* up the compiler so it is 43% faster lets me 
know that I should expect compilation time of my code to be 
approximately cut in half.

When you say 75% increase in speed I have to actually do some 
calculation and hopefully also interpret speed properly.

Nowhere in the article do you refer to the lines per second or 
any technical definition of speed.

It's a somewhat informal article but you are using a rather 
formal definition of speed and it also does not directly give the 
user an obvious metric as just giving them the percentage change 
of time.





More information about the Digitalmars-d-announce mailing list