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

Use env where it works #1877

Merged
merged 1 commit into from
Jun 23, 2020
Merged

Use env where it works #1877

merged 1 commit into from
Jun 23, 2020

Conversation

vmchale
Copy link
Collaborator

@vmchale vmchale commented Jun 23, 2020

This use env so that bits of memory are only alive while the appropriate benchmark is being run. This makes the benchmarks more independent from one another; otherwise the allocator/garbage collector interfere across benchmarks.

This doesn't work with loadPrelude; not quite sure why - perhaps the directory change?

@sjakobi
Copy link
Collaborator

sjakobi commented Jun 23, 2020

Thanks!

Can you observe an effect of env on the benchmark results? Less variance possibly?

No idea regarding loadPrelude I'm afraid…

@vmchale
Copy link
Collaborator Author

vmchale commented Jun 23, 2020

Yes! It actually makes some things a wee bit faster.

Copy link
Collaborator

@sjakobi sjakobi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool!

BTW, if you need more reliable benchmark results, you can also try the --measure-with option:

http://hackage.haskell.org/package/gauge-0.2.5/docs/Gauge-Main-Options.html#t:Config

Feel free to merge yourself or add the merge-me label to let mergify take care of it.

@sjakobi
Copy link
Collaborator

sjakobi commented Jun 23, 2020

This is the bug that inspired --measure-with: haskell/criterion#166

@mergify mergify bot merged commit 6e1fdd8 into master Jun 23, 2020
@mergify mergify bot deleted the use-env branch June 23, 2020 19:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants