-
-
Notifications
You must be signed in to change notification settings - Fork 46
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[fix] remove space leaks in (,) by using strict state #234
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very nice, thanks a lot!
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 |