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

Label: make types field a Rc #608

Merged
merged 2 commits into from
Feb 8, 2022
Merged

Label: make types field a Rc #608

merged 2 commits into from
Feb 8, 2022

Conversation

Acaccia
Copy link
Contributor

@Acaccia Acaccia commented Feb 8, 2022

Fixes #603

This was an easy win, simply changing the types field in Label to an Rc<Types> gave instant improvement in performances, as seen on those benchmarks:
criterion.tar.gz (decompress and open report/index.html)

The flamegraph generated from the same benchmark doesn't even show any Label operation anymore:
image

@Acaccia Acaccia requested a review from yannham February 8, 2022 13:31
@Acaccia Acaccia self-assigned this Feb 8, 2022
@github-actions github-actions bot temporarily deployed to pull request February 8, 2022 13:34 Inactive
@aspiwack
Copy link
Member

aspiwack commented Feb 8, 2022

How much time did the benchmark gain overall?

@yannham
Copy link
Member

yannham commented Feb 8, 2022

I believe there is no global gain reported in criterion, but randomly clicking through the benchmarks shows that some did not move a lot, and others got anything between roughly a few percents and 30~40%. Several are in the 30-40% zone, which is a nice return for slapping one Rc on top of a struct field. In the end we will still want to fully Rc Types, though, if only for typechecking.

@Acaccia Acaccia merged commit fb9d621 into master Feb 8, 2022
@Acaccia Acaccia deleted the rc_type branch February 8, 2022 15:09
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.

Cloning and droping of Labels take a schoking amount of time
3 participants