I’m trying the purescript-parsing benchmarks with purs-backend-es and the difference is so absurd that I’m sure the benchWith
arguments are being removed because it’s code which “we know for certain is not demanded.”
Any tips for how to prevent the benchmark loops from being removed?
purs |
purs-backend-es |
---|---|
runParser many digit 10000
mean = 6.62 ms stddev = 2.77 ms min = 5.41 ms max = 22.57 ms |
runParser many digit 10000
mean = 2.63 μs stddev = 13.23 μs min = 214.00 ns max = 91.69 μs |
runParser Array.many digit 10000
mean = 65.85 ms stddev = 3.92 ms min = 61.14 ms max = 79.15 ms |
runParser Array.many digit 10000
mean = 209.60 ns stddev = 147.29 ns min = 172.00 ns max = 1.22 μs |
StringParser manyRec CodePoints.anyDigit 10000
mean = 5.99 ms stddev = 2.60 ms min = 4.34 ms max = 15.32 ms |
StringParser manyRec CodePoints.anyDigit 10000
mean = 250.55 ns stddev = 242.06 ns min = 187.00 ns max = 1.28 μs |