Skip to content

Commit bc5d4aa

Browse files
committed
lower unrolled map iteration limit
this lower the probability of stack-size troubles
1 parent 677342a commit bc5d4aa

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/Data/List/Types.purs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -78,9 +78,9 @@ instance functorList :: Functor List where
7878
-- chunk sizes determined through experimentation
7979
listMap :: forall a b. (a -> b) -> List a -> List b
8080
listMap f = startUnrolledMap unrollLimit where
81-
-- iterate the unrolled map up to 1000 times,
82-
-- which hits up to 5000 elements
83-
unrollLimit = 1000
81+
-- iterate the unrolled map up to 200 times,
82+
-- which hits up to 1000 elements
83+
unrollLimit = 200
8484

8585
startUnrolledMap :: Int -> List a -> List b
8686
startUnrolledMap 0 (x : xs) = f x : chunkedRevMap xs

0 commit comments

Comments
 (0)