[fix] remove space leaks in (,) by using strict state#234
[fix] remove space leaks in (,) by using strict state#234infinisil merged 1 commit intoNixOS:masterfrom
Conversation
MangoIV
commented
Aug 16, 2024
- benchmarks on maintainer-list.nix give a baseline of 88M max residency, nice triangle of death and a bit over 4 seconds duration
- heap profile shows a lot of memory allocated to (,)
- removing usagge of (,) in own code didn't affect the profile
- changing to strict state improves memory from 88 to 40 max residency and runtime goes down by 1 second
- benchmarks on maintainer-list.nix give a baseline of 88M max residency, nice triangle of death and a bit over 4 seconds duration - heap profile shows a lot of memory allocated to (,) - removing usagge of (,) in own code didn't affect the profile - changing to strict state improves memory from 88 to 40 max residency and runtime goes down by 1 second
|
Can I ask how you're doing the benchmarking? I don't have a lot of experience doing that with Haskell |
Heap Profiling: compile the program with profiling (e.g. by using the Time profiling: almost the same, except you run with The GHC manual also has a section about profiling haskell programs: If you happen to have space leaks, you often can bring down max residency and run time at once, if you are lucky enough to find the space leak |
|
lazy state is a huge red flag though, so that wasn't too hard, thankfully. |
|
Very useful, thanks! |
|
The big brown triangle is labeled with |
|
(yeah, the space leak of the parser is still pretty bad, I just now fixed |


