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

add a hash-table benchmark

parent dc9b2267
TOP = ../..
include $(TOP)/mk/
FAST_OPTS = 1000000
NORM_OPTS = 10000000
SLOW_OPTS = 100000000
ifeq "$(HEAP)" "LARGE"
include $(TOP)/mk/
import Control.Monad
import qualified Data.HashTable as H
import System.Environment
main = do
[size] <- fmap (fmap read) getArgs
m <- (==) 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