Arrows.hs Measurements
Command: | |
$ inplace/bin/ghc-stage2 -ddump-timings ~/Arrows.hs | |
Measurements: | |
master | |
Parser [Main]: alloc=9560778976 time=7956.168 | |
Parser [Main]: alloc=9560778976 time=7911.255 | |
Parser [Main]: alloc=9560778976 time=7978.155 | |
Parser [Main]: alloc=9560778976 time=8072.056 | |
Parser [Main]: alloc=9560778976 time=7867.061 | |
wip/exp-pat-frame (deep embedding) | |
Parser [Main]: alloc=9574418648 time=8050.242 | |
Parser [Main]: alloc=9574418648 time=7928.873 | |
Parser [Main]: alloc=9574418648 time=7896.294 | |
Parser [Main]: alloc=9574418648 time=7917.393 | |
Parser [Main]: alloc=9574418648 time=7840.901 | |
wip/exp-cmd-frame (shallow embedding, without --coerce) | |
Parser [Main]: alloc=9899586040 time=8769.317 | |
Parser [Main]: alloc=9899586040 time=8843.270 | |
Parser [Main]: alloc=9899586040 time=8698.141 | |
Parser [Main]: alloc=9899586040 time=8757.309 | |
Parser [Main]: alloc=9899586040 time=8771.368 | |
wip/exp-cmd-frame (shallow embedding, with --coerce) | |
Parser [Main]: alloc=9706356832 time=7963.211 | |
Parser [Main]: alloc=9706356832 time=8002.884 | |
Parser [Main]: alloc=9706356832 time=8085.704 | |
Parser [Main]: alloc=9706356832 time=8042.423 | |
Parser [Main]: alloc=9706356832 time=8007.699 |
This comment has been minimized.
This comment has been minimized.
Using a GADT instead of a CPS encoding in the shallow embedding had no effect: time spent is still approximately equal to that in
Allocations are apparently slightly reduced. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This comment has been minimized.
NB. Thermal throttling of my CPU seemed to have an effect on the execution time, changing the results by up to 1500 units. The performance numbers were much worse right after a full rebuild (in the ballpark of 9500).
When interleaving tests for
master
,wip/exp-pat-frame
(deep embedding), andwip/exp-cmd-frame (shallow embedding
(with--coerce
), I observe very similar numbers:master
:Parser [Main]: alloc=9560778976 time=7973.300
wip/exp-pat-frame
:Parser [Main]: alloc=9574418648 time=7878.008
wip/exp-cmd-frame
:Parser [Main]: alloc=9706356832 time=7957.351
It is therefore safe to conclude that neither of the approaches has any significant impact on parsing performance. Omitting
--coerce
has some negative performance impact, about 10%.