1{-# LANGUAGE OverloadedStrings #-}
3-- This benchmark reveals a huge performance regression that showed up
4-- under GHC 7.8.1 (https://github.com/bos/attoparsec/issues/56).
6-- With GHC 7.6.3 and older, this program runs in 0.04 seconds. Under
7-- GHC 7.8.1 with (<|>) inlined, time jumps to 12 seconds!
9import Control.Applicative
10import Data.Text (Text)
11import qualified Data.Attoparsec.Text as A
12import qualified Data.Text as T
14testParser :: Text -> Either String Int
15testParser f = fmap length -- avoid printing out the entire matched list
16 . A.parseOnly (many ((() <$ A.string "b") <|> (() <$ A.anyChar)))
20main = print . testParser $ T.replicate 50000 "a"
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list