Skip to content

perf: replace string-cache with bucket-level version #1879

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

Merged
merged 1 commit into from
Feb 17, 2023

Conversation

Boshen
Copy link
Contributor

@Boshen Boshen commented Feb 17, 2023

See servo/string-cache#268

For testing, I ran rspack build for 100 iterations for both mgp and apaas, no errors encountered.

Perf gain:

  • p1: 15s -> 12s
  • p2: 20s -> 18s

@changeset-bot
Copy link

changeset-bot bot commented Feb 17, 2023

⚠️ No Changeset found

Latest commit: 3669415

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@IWANABETHATGUY
Copy link
Contributor

!bench

@github-actions
Copy link
Contributor

Benchmark Results

group                                                 baseline                               pr
-----                                                 --------                               --
criterion_benchmark/ten_copy_of_threejs               1.80    543.4±6.30ms        ? ?/sec    1.00    301.4±2.59ms        ? ?/sec
high_cost_benchmark/ten_copy_of_threejs_production    1.09       4.7±0.02s        ? ?/sec    1.00       4.3±0.01s        ? ?/sec

@Boshen Boshen force-pushed the string-cache-bucket-mutex branch from 2a87cde to 3669415 Compare February 17, 2023 07:49
@Boshen
Copy link
Contributor Author

Boshen commented Feb 17, 2023

The Vec version is flawed, let's try the slightly slower but correct linked-list version.
Boshen/string-cache#3

@Boshen
Copy link
Contributor Author

Boshen commented Feb 17, 2023

!bench

@github-actions
Copy link
Contributor

Benchmark Results

group                                                 baseline                               pr
-----                                                 --------                               --
criterion_benchmark/ten_copy_of_threejs               1.68    539.9±5.42ms        ? ?/sec    1.00    320.8±2.81ms        ? ?/sec
high_cost_benchmark/ten_copy_of_threejs_production    1.04       4.8±0.02s        ? ?/sec    1.00       4.6±0.01s        ? ?/sec

@Boshen Boshen merged commit 33daa3b into main Feb 17, 2023
@Boshen Boshen deleted the string-cache-bucket-mutex branch February 17, 2023 09:17
@hyf0
Copy link
Contributor

hyf0 commented Feb 17, 2023

!snapshot

@github-actions
Copy link
Contributor

0.0.0-3669415e-20230217092725

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.

3 participants