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

Achim Schneider barsoap at web.de
Fri Feb 20 15:37:11 EST 2009


Don Stewart <dons at galois.com> wrote:

> (The bang patterns aren't needed). Note how he counts backwards from
> 10^9. Was there a reason for that, Bulat?
>
Tests against zero are faster, as you don't need a second operand... by
now, some platforms might be smart enough, but down-counting in loops
is still in my hard-wired optimisation generator, alongside with 
xor op, op to set op to zero, shifts instead of divides and similar
no-brainers. Testing an Integer against 0 is certainly faster than
testing it against 2^128^128.

-- 
(c) this sig last receiving data processing entity. Inspect headers
for copyright history. All rights reserved. Copying, hiring, renting,
performance and/or quoting of this signature prohibited.




More information about the Haskell-Cafe mailing list