1{-# LANGUAGE BangPatterns, OverloadedStrings, RankNTypes #-}
7import Control.Monad (forM_)
8import qualified Data.ByteString as B
9import qualified Data.Text as Text
10import Data.Text.Encoding (decodeUtf8)
11import Data.Text (Text)
12import System.IO (hFlush, stdout)
17bm :: forall a. (Text -> a) -> BM
20benchmarks :: [(String, Text.Text -> ())]
22 ("find_first", bm $ Text.isInfixOf "en:Benin")
23 , ("find_index", bm $ Text.findIndex (=='c'))
28 !contents <- decodeUtf8 `fmap` B.readFile "../tests/text-test-data/yiwiki.xml"
29 forM_ benchmarks $ \(name, bmark) -> do
32 putStrLn =<< (timer 100 contents bmark)
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