Commit 49f49177 authored by Simon Marlow's avatar Simon Marlow

add a hash-table benchmark

parent dc9b2267
TOP = ../..
include $(TOP)/mk/boilerplate.mk
FAST_OPTS = 1000000
NORM_OPTS = 10000000
SLOW_OPTS = 100000000
ifeq "$(HEAP)" "LARGE"
SRC_RUNTEST_OPTS += +RTS -H430m -RTS
endif
include $(TOP)/mk/target.mk
import Control.Monad
import qualified Data.HashTable as H
import System.Environment
main = do
[size] <- fmap (fmap read) getArgs
m <- H.new (==) H.hashInt
forM_ [1..size] $ \n -> H.insert m n n
v <- H.lookup m 100
print v
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment