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

Add benchmarks for the lazily parsed data #140

Merged
merged 2 commits into from
Sep 10, 2019

Conversation

philipc
Copy link
Contributor

@philipc philipc commented Sep 10, 2019

Also disable parallel codegen for benchmarks. This improves the benchmarks due to better inlining, and makes them a more reliable tool for determining the effect of code changes.

Before:

test context_new_and_query_location       ... bench:   3,111,057 ns/iter (+/- 530,666)
test context_new_and_query_with_functions ... bench:   4,172,368 ns/iter (+/- 556,175)
test context_new_location                 ... bench:   2,857,732 ns/iter (+/- 152,999)
test context_query_location               ... bench:     713,752 ns/iter (+/- 45,922)
test context_query_with_functions         ... bench:   4,526,699 ns/iter (+/- 567,636)

After:

test context_new_and_query_location       ... bench:   2,953,517 ns/iter (+/- 103,705)
test context_new_and_query_with_functions ... bench:   3,803,000 ns/iter (+/- 610,173)
test context_new_location                 ... bench:   2,784,894 ns/iter (+/- 694,324)
test context_query_location               ... bench:     717,903 ns/iter (+/- 62,360)
test context_query_with_functions         ... bench:   4,258,835 ns/iter (+/- 171,619)

@coveralls
Copy link

Coverage Status

Coverage decreased (-1.7%) to 71.965% when pulling 7f821bd on philipc:bench-lazy into 8ae1391 on gimli-rs:master.

Copy link
Member

@fitzgen fitzgen left a comment

Choose a reason for hiding this comment

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

Nice!

@fitzgen fitzgen merged commit 5ca813a into gimli-rs:master Sep 10, 2019
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

Successfully merging this pull request may close these issues.

None yet

3 participants