Analysis of programming languages on Rosetta

bearophile via Digitalmars-d digitalmars-d at puremagic.com
Wed Sep 24 15:45:27 PDT 2014


Joakim:

> Of course, that's meaningless if they were run on CPUs that 
> varied a lot in ability,

The CPU is the same (mine) but the Haskell timings is imprecise 
and can't be relied upon (perhaps I have to recompute it).
(Rosettacode has a policy of not showing the run-time of 
programs. They are probably making an exception for me because of 
some reasons and because they are gentle with me, but I 
understand their reasons are also good.)


> but am I right in guessing that you wrote the Haskell version 
> too?

The Haskell entry was written by someone else, but later I have 
cleaned up it a little in several ways.


> If so, I do think it means something that the simple version 
> for D was so much faster, but depending on the possibly easy 
> optimizations missed by the Haskell implementor, maybe not much.

There are so many differences between the way Haskell manages 
lists and trunks lazily compared to how D manages ranges... very 
different tradeoffs on many different levels. The size of this 
newsgroup post is not enough to even list them :-)


> Yes, the skill of the contributors and amount of time spent 
> matters a lot, no doubt.

It's not just a matter of skill of the contributors and amount of 
time spent, it's also first of all a matter of how much 
semantically clean you want to write the code, how many 
abstractions you accept to remove from the implementation, how 
much you care for many factors more than performance, etc.

Bye,
bearophile


More information about the Digitalmars-d mailing list