More speed optimizations for haskell #3