On 11/13/07, Ryan Ingram <[EMAIL PROTECTED]> wrote: > > Also, what stops getRule from going off the end of the array? I didn't > see anything that prevented that in the code, and you're using unsafeAt, > which seems like a potential bug. >
Never mind, I realized this is a ring buffer with `mod` s. That's another slow operation when you're doing code as tight as this. If you can guarantee the ring is a power of 2 in size you can use a mask instead, or use my original suggestion of deriving rules from the previous rule and the new bit; the initial state is determined by the last bits in the buffer and you never wrap. -- ryan
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe