Commit 271dc00f authored by Sebastian Graf's avatar Sebastian Graf Committed by Sebastian Graf

Stabilise gen_regexp again

While investigating a 5% runtime regression, I realised that
`gen_regexp` wasn't sufficiently stable wrt. GC parameterisations.

This is now rectified by iterating 500 instead of 100 times.
parent c20122e0
Pipeline #1136 passed with stage
in 5 minutes and 35 seconds
...@@ -9,12 +9,13 @@ ...@@ -9,12 +9,13 @@
module Main (main) where module Main (main) where
import Data.Char import Data.Char
import Control.Monad (forM_) import Control.Monad (replicateM_)
import System.Environment import System.Environment
import NofibUtils (hash)
main = forM_ [1..100] $ const $ do main = replicateM_ 500 $ do
(regex:_) <- getArgs (regex:_) <- getArgs
print (numchars (expand regex)) print (hash (concat (expand regex)))
numchars :: [String] -> Int numchars :: [String] -> Int
numchars l = sum $ map length l numchars l = sum $ map length l
......
...@@ -2,6 +2,6 @@ TOP = ../.. ...@@ -2,6 +2,6 @@ TOP = ../..
include $(TOP)/mk/boilerplate.mk include $(TOP)/mk/boilerplate.mk
include $(TOP)/mk/target.mk include $(TOP)/mk/target.mk
FAST_OPTS = [a-j][a-j][a-j][0-9][p-z] FAST_OPTS = [a-j][a-j][a-j][0-9]
NORM_OPTS = [a-j][a-j][a-j][a-j][a-j][1-2]abcdefghijklmnopqrstuvwxy NORM_OPTS = [a-l][a-l][a-l][a-l][1-1]abcdefghijklmnopqrstuvwxy
SLOW_OPTS = [a-j][a-j][a-j][a-j][a-j][1-5]abcdefghijklmnopqrstuvwxy SLOW_OPTS = [a-l][a-l][a-l][a-l][1-5]abcdefghijklmnopqrstuvwxy
../../common/NofibUtils.hs
\ No newline at end of file
This diff is collapsed.
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