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

Changes ConcurrentSlab to no longer clone values #5313

Merged
merged 3 commits into from
Dec 2, 2023

Conversation

esdrubal
Copy link
Contributor

@esdrubal esdrubal commented Nov 29, 2023

Description

ConcurrentSlab now stores and returns an Arc, and on get it only clones an Arc which is much cheaper than cloning the whole values.

The type engine is still cloning every TypeInfo we should be able to also avoid that and get further improvements in speed.

With these changes core + std-lib compilation improved from around 3 secs to 1.5 secs.
cargo run --bin test --release is running in around 8min versus 16min in master.

Checklist

  • I have linked to any relevant issues.
  • I have commented my code, particularly in hard-to-understand areas.
  • I have updated the documentation where relevant (API docs, the reference, and the Sway book).
  • I have added tests that prove my fix is effective or that my feature works.
  • I have added (or requested a maintainer to add) the necessary Breaking* or New Feature labels where relevant.
  • I have done my best to ensure that my PR adheres to the Fuel Labs Code Review Standards.
  • I have requested a review from the relevant team or maintainers.

@esdrubal esdrubal self-assigned this Nov 29, 2023
@esdrubal esdrubal force-pushed the concurrent_slab_without_clone branch 5 times, most recently from ba79778 to 91e5855 Compare November 30, 2023 16:38
@esdrubal esdrubal requested a review from a team November 30, 2023 16:48
@esdrubal esdrubal marked this pull request as ready for review November 30, 2023 16:49
`ConcurrentSlab` now stores and returns an Arc, and on `get` it only clones an Arc which is much cheaper than cloning the whole values.

The type engine is still cloning every TypeInfo we should be able to also avoid that and get further improvments in speed.

With these changes core + std-lib compilation improved from around 3 secs to 1.5 secs.
@esdrubal esdrubal force-pushed the concurrent_slab_without_clone branch 3 times, most recently from 6a9fe44 to 6be89ed Compare December 1, 2023 21:16
@esdrubal esdrubal force-pushed the concurrent_slab_without_clone branch from 6be89ed to 55f439d Compare December 1, 2023 23:37
Copy link
Member

@JoshuaBatty JoshuaBatty left a comment

Choose a reason for hiding this comment

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

Awesome work!

@IGI-111 IGI-111 merged commit 1e12d5d into master Dec 2, 2023
32 checks passed
@IGI-111 IGI-111 deleted the concurrent_slab_without_clone branch December 2, 2023 19:08
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.

4 participants