Skip to content

Commit

Permalink
Document why annotations are there
Browse files Browse the repository at this point in the history
  • Loading branch information
ruuda committed Mar 11, 2019
1 parent 97a827e commit f3e6d3d
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Data/Text/AhoCorasick/Automaton.hs
Expand Up @@ -442,6 +442,10 @@ runWithCase caseSensitivity seed f machine text =

-- NOTE: All of the arguments are strict here, because we want to compile
-- them down to unpacked variables on the stack, or even registers.
-- The INLINE / NOINLINE annotations here were added to fix a regression we
-- observed when going from GHC 8.2 to GHC 8.6, and this particular
-- combination of INLINE and NOINLINE is the fastest one. Removing increases
-- the benchmark running time by about 9%.

{-# NOINLINE consumeInput #-}
consumeInput :: Int -> Int -> a -> State -> a
Expand Down

0 comments on commit f3e6d3d

Please sign in to comment.