[Haskell-cafe] Re: speed: ghc vs gcc

Sebastian Sylvan sylvan at student.chalmers.se
Sat Feb 21 19:19:56 EST 2009


On Sun, Feb 22, 2009 at 12:10 AM, Bulat Ziganshin <bulat.ziganshin at gmail.com
> wrote:

> Hello Sebastian,
>
> Sunday, February 22, 2009, 2:55:38 AM, you wrote:
> >  yes, you are right. Don also compared results of 64x-reduced
> >  computation with full one. are you think that these results are more
> >  fair?
>
> > Yes. Clearly so.
> > It still computes the result from scratch - it just uses a trick
> > which generates better code. This is clearly a useful and worthwhile
> > exercise as it shows A) A neat trick with TH, B) A reasonably
> > practical way to produce fast code for the critical parts of a
> > Haskell app, C) a motivating example for implementing a compiler
> > optimization to do it automatically.
>
> yes, but does you know why his last program is 64x faster than simple
> code? it's because *gcc* optimize it this way. the first program i
> published there does it by mistake, then i fixed it by using 'xor'
> instead of (+) and published here that i've considered most fair
> comparison
>
> OTOH Don used this gcc optimization to generate faster code for
> haskell. he doesn't used this trick for C++ and doesn't omitted
> unoptimized gcc results from the chart. as a result people who don't
> analyzed details made conclusion that ghc outperformed gcc here
>
> so i have made experiment with cheating the same way, but in more
> obvious manner. and i got 3 angry answers in 5 minutes. so what are
> the difference? you don't catched details of Don comparison or you
> bothered only by gcc-related cheating?
>

Bulat, please stop insulting everyone whenever you discuss something. Was
that sentence really necessary? You really think it's productive to
insinuate that I'm intellectualy dishonest?
I'm afraid I don't understand what you're talking about, could you try being
a bit clearer?
As I understand it you compared a gcc version which printed the precomputed
result, with a GHC version which computed the result at runtime, and got the
"150x" figure from that. Is this incorrect? If so, say so.

Don't accuse everyone who disagrees with you of being dishonest. NOBODY in
this thread has said anything to even remotely suggest that they think it's
okay to "cheat" in favour of Haskell and consider it fair, yet you jump to
this conclusion every single time. Please, give people the benefit of the
doubt? Just because someone disagrees with you does not make them stupid or
dishonest. Maybe they're actually right, or maybe you didn't make your point
clear enough, or maybe they just misunderstood you. Either way, please try
to be civil.

The only argument anyone made towards "cheating" on the gcc side is that ANY
program which just prints a precomputed result is worthless for comparisoin
(regardless of which side is doing it).

-- 
Sebastian Sylvan
+44(0)7857-300802
UIN: 44640862
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/haskell-cafe/attachments/20090222/0280d71a/attachment.htm


More information about the Haskell-Cafe mailing list