Re: [Haskell-cafe] ghc and jump table generation

2013-07-18 Thread Niklas Larsson
Hi! 2013/7/18 Erik Rantapaa > > > I've been looking at the assembly code that ghc generates for simple > pattern matching for situations like: > > foo :: Int -> Int > foo 1 = 3 > foo 2 = 10 > foo 3 = 2 > foo 4 = 42 > -- ... other random assignments > > and I noticed that it doesn't seem to gene

[Haskell-cafe] ghc and jump table generation

2013-07-18 Thread Erik Rantapaa
I've been looking at the assembly code that ghc generates for simple pattern matching for situations like: foo :: Int -> Int foo 1 = 3 foo 2 = 10 foo 3 = 2 foo 4 = 42 -- ... other random assignments and I noticed that it doesn't seem to generate a jump table (or even a table lookup)  like, fo