[Haskell-cafe] Optimizing cellular automata evaluation (round 2)
jgbailey at gmail.com
Fri Nov 30 13:03:18 EST 2007
On Nov 29, 2007 9:11 PM, Jon Harrop <jon at ffconsultancy.com> wrote:
> Mathematica uses a single arbitrary-precision integer to represent each
> generation of a 1D automaton. The rules to derive the next generation are
> compiled into arithmetic operations on the integer. The offloads all such
> work onto your big number library and, with GMP, will be as fast in Haskell
> as most other languages.
Does GHC already use the GMP library for Integer? It looks that way
but I'm not positive. That'd be ironic, if the higher-level Integer
representation is faster than a low-level bitwise one ... Still, I
suspect accessing individual "bits" might kill me if I'm not able to
move most of the calculation into a call to the library.
Do you mind elaborating on how rules are compiled into 'arithmetic'
operations or providing a link?
More information about the Haskell-Cafe