[Haskell-cafe] In for a penny, in for a pound.

Donald Bruce Stewart dons at cse.unsw.edu.au
Sun Jan 8 20:56:19 EST 2006

> Regarding the Fannkuch Shootout Entry:
> If we are willing to specialize flop in the way shown on the wiki,  
> another 8% can be gained by similarly specializing rotate:
> rotate 2 (x1:x2:xs) = x2:x1:xs
> rotate 3 (x1:x2:x3:xs) = x2:x3:x1:xs

Cheers, I've updated the proposed entry on the wiki. It now runs 40%
faster than Bertram's original entry, and its within 25% of an
imperative version I wrote yesterday translating from the currently
fastest C version.

Note that the imperative version is unoptimised so far though, so there
could be room to move here, and it may be worth while translating some
of the other C entries, to submit a fast, alongside an elegant entry.

Entries that may currently be worth submitting:
   takfp                     - http://www.haskell.org/hawiki/TakfpEntry
   pidigits (currently 2nd!) - http://www.haskell.org/hawiki/PidigitsEntry 
   mandelbrot                - http://www.haskell.org/hawiki/MandelbrotEntry
   harmonic                  - http://www.haskell.org/hawiki/HarmonicEntry
   fannkuch (pure and impure) - http://www.haskell.org/hawiki/FannkuchEntry

Chris, would you like to submit these?

-- Don

More information about the Haskell-Cafe mailing list