Skip to content

Commit 8284518

Browse files
committed
lower unrolled map iteration limit
this lower the probability of stack-size troubles
1 parent f999ca1 commit 8284518

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
@@ -75,9 +75,9 @@ instance functorList :: Functor List where
7575
-- chunk sizes determined through experimentation
7676
listMap :: forall a b. (a -> b) -> List a -> List b
7777
listMap f = startUnrolledMap unrollLimit where
78-
-- iterate the unrolled map up to 1000 times,
79-
-- which hits up to 5000 elements
80-
unrollLimit = 1000
78+
-- iterate the unrolled map up to 200 times,
79+
-- which hits up to 1000 elements
80+
unrollLimit = 200
8181

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

0 commit comments

Comments
 (0)