Skip to content
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

please document that (and how) criterion runs GC #272

Open
jwaldmann opened this issue Mar 26, 2023 · 1 comment
Open

please document that (and how) criterion runs GC #272

jwaldmann opened this issue Mar 26, 2023 · 1 comment

Comments

@jwaldmann
Copy link

I was running a benchmark with +RTS -Sstderr (trying to find a good -A.. value)

I was surprised to see heavy garbage collection going on - since I was expecting that my function does little allocation, and I put large +RTS -M.. -H.. values.

Then I read #257 (etc.) and deduced that criterion runs the collector. I understand the motivation - but it's not quite clear (to me) from the text at https://hackage.haskell.org/package/criterion-1.6.0.0/docs/Criterion-Main.html, where "garbage collection" is only mentioned in connection to "environments" - but my (very simple) benchmark does not use them.

@jwaldmann
Copy link
Author

NB: gauge improves on this, their https://hackage.haskell.org/package/gauge-0.2.5/docs/Gauge-Main.html#v:defaultMainWith shows forceGC.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant