D component programming is a joke (Was: Re: Component programming)

Walter Bright newshound2 at digitalmars.com
Wed Jul 31 16:37:57 PDT 2013


On 7/31/2013 4:17 PM, bearophile wrote:
> Walter Bright:
>
>> Ironically, the component program from the article I wrote:
>> ...
>> is 2x faster than the Haskell version:
>
> Benchmarking code written in two different languages is tricky, there are so
> many sources of mistakes, even if you know well both languages. But I accept
> your timing. And I say that it's good :-) We should aim to be better than the
> Intel Labs Haskell Research Compiler (HRC) :-)

You are right to be skeptical of cross language benchmarks.

Some data points you might find interesting:

1. I made no attempt to optimize the D version (other than throwing the 
appropriate compiler switches). It's meant to be the straightforward "naive" 
implementation.

2. I did not write the Haskell version - Bartosz Milewski did. He admits to not 
being an expert on Haskell, and there may be faster ways to do it.


I'll also agree with you that the component programming style is new in D, and 
probably could benefit a great deal from 20 years of concerted effort :-)

I disagree with you that it is a toy, however. Speed is only one measure of utility.



More information about the Digitalmars-d mailing list