Skip to content

Comments

perf(isolated-declarations): use FxHashSet instead of Vec to speed up the contain#4074

Merged
Boshen merged 4 commits intomainfrom
07-07-perf_isolated-declarations_use_fxhashset_instead_of_vec_to_speed_up_the_contain
Jul 7, 2024
Merged

perf(isolated-declarations): use FxHashSet instead of Vec to speed up the contain#4074
Boshen merged 4 commits intomainfrom
07-07-perf_isolated-declarations_use_fxhashset_instead_of_vec_to_speed_up_the_contain

Conversation

@Dunqing
Copy link
Member

@Dunqing Dunqing commented Jul 6, 2024

I tried it on my laptop. It was nearly three times faster than before.

@graphite-app
Copy link
Contributor

graphite-app bot commented Jul 6, 2024

Your org has enabled the Graphite merge queue for merging into main

Add the label “merge” to the PR and Graphite will automatically add it to the merge queue when it’s ready to merge. Or use the label “hotfix” to add to the merge queue as a hot fix.

You must have a Graphite account and log in to Graphite in order to use the merge queue. Sign up using this link.

Copy link
Member Author

Dunqing commented Jul 6, 2024

@github-actions github-actions bot added the A-isolated-declarations Isolated Declarations label Jul 6, 2024
@Dunqing Dunqing changed the title perf(isolated-declarations): use FxHashSet instead of Vec to speed up the contain perf(isolated-declarations): use FxHashSet instead of Vec to speed up the contain Jul 6, 2024
@codspeed-hq
Copy link

codspeed-hq bot commented Jul 6, 2024

CodSpeed Performance Report

Merging #4074 will improve performances by ×5.2

Comparing 07-07-perf_isolated-declarations_use_fxhashset_instead_of_vec_to_speed_up_the_contain (a5a2127) with main (0c7f3ee)

Summary

⚡ 1 improvements
✅ 28 untouched benchmarks

Benchmarks breakdown

Benchmark main 07-07-perf_isolated-declarations_use_fxhashset_instead_of_vec_to_speed_up_the_contain Change
isolated-declarations[vue-id.ts] 1,950.5 ms 377.2 ms ×5.2

Copy link
Member

@Boshen Boshen left a comment

Choose a reason for hiding this comment

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

We need a benchmark at this point, can you add a large one to https://github.com/oxc-project/benchmark-files, generate a benchmark on main, and then rebase this PR so we observe the difference?

@Dunqing Dunqing force-pushed the 07-07-perf_isolated-declarations_use_fxhashset_instead_of_vec_to_speed_up_the_contain branch from bcc7fc3 to 6cd4b21 Compare July 7, 2024 06:28
@Dunqing Dunqing changed the base branch from main to 07-07-chore_benchmark_add_isolated_declarations July 7, 2024 06:28
@Dunqing Dunqing force-pushed the 07-07-chore_benchmark_add_isolated_declarations branch from 57ab43b to 1a9e82c Compare July 7, 2024 06:45
@Dunqing Dunqing force-pushed the 07-07-perf_isolated-declarations_use_fxhashset_instead_of_vec_to_speed_up_the_contain branch from 6cd4b21 to 11c56cd Compare July 7, 2024 06:45
Base automatically changed from 07-07-chore_benchmark_add_isolated_declarations to main July 7, 2024 09:14
@Boshen Boshen force-pushed the 07-07-perf_isolated-declarations_use_fxhashset_instead_of_vec_to_speed_up_the_contain branch from 8e67380 to ea493d6 Compare July 7, 2024 11:16
@Boshen Boshen force-pushed the 07-07-perf_isolated-declarations_use_fxhashset_instead_of_vec_to_speed_up_the_contain branch from ea493d6 to a5a2127 Compare July 7, 2024 13:12
@Dunqing
Copy link
Member Author

Dunqing commented Jul 7, 2024

5.x faster than before 🤩

@Boshen Boshen merged commit 7ed27b7 into main Jul 7, 2024
@Boshen Boshen deleted the 07-07-perf_isolated-declarations_use_fxhashset_instead_of_vec_to_speed_up_the_contain branch July 7, 2024 16:16
@github-actions github-actions bot mentioned this pull request Jul 8, 2024
Boshen added a commit that referenced this pull request Jul 8, 2024
## [0.17.2] - 2024-07-08

### Features

- 115ac3b allocator: Introduce `FromIn` and `IntoIn` traits. (#4088)
(rzvxa)
- 720983a napi/transform: Allow setting `sourceType` to `transform`
(#4113) (Boshen)
- e386b62 semantic: Check for invalid type import assignments (#4097)
(DonIsaac)

### Bug Fixes

- 5472b7c codegen: 256 indentations level is not enough for codegen
(Boshen)
- 5c31236 isolated-declarations: Keep literal value for readonly
property (#4106) (Dunqing)
- e67c7d1 isolated-declarations: Do not infer type for private
parameters (#4105) (Dunqing)
- 3fcad5e isolated_declarations: Remove nested AssignmentPatterns from
inside parameters (#4077) (michaelm)
- f8d77e4 isolated_declarations: Infer type of template literal
expressions as string (#4068) (michaelm)
- 0f02608 semantic: Bind `TSImportEqualsDeclaration`s (#4100) (Don
Isaac)
- 4413e2d transformer: Missing initializer for readonly consructor
properties (#4103) (Don Isaac)

### Performance

- 7ed27b7 isolated-declarations: Use `FxHashSet` instead of `Vec` to
speed up the `contain` (#4074) (Dunqing)
- 9114c8e semantic: Keep a single map of unresolved references (#4107)
(Luca Bruno)

Co-authored-by: Boshen <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-isolated-declarations Isolated Declarations

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants