perf(linter, prettier, diagnostics): use FxHashMap instead of std::collections::HashMap#5993
Conversation
Your org has enabled the Graphite merge queue for merging into mainAdd the label “0-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. |
This stack of pull requests is managed by Graphite. Learn more about stacking. Join @camchenry and the rest of your teammates on |
CodSpeed Performance ReportMerging #5993 will not alter performanceComparing Summary
|
|
Oh my! How did these go under the radar? Would you like to try banning these in Line 3 in f5eee72 |
|
@Boshen yeah, was going to ask about that! I can do that |
d457e63 to
283a97a
Compare
Merge activity
|
…:collections::HashMap` (#5993) Using `FxHashMap` is faster than `HashMap` in many cases, especially for hashing-heavy workloads. This change improves the performance of the linter, prettier, and diagnostics crates by using `FxHashMap` instead of `std::collections::HashMap`.
283a97a to
2b17003
Compare
## [0.30.1] - 2024-09-24 ### Features - 5c323a2 minifier: Loop compressor passes (#6013) (Boshen) ### Bug Fixes - 9ca202a codegen: Preserve newlines between comments (#6014) (Boshen) - 4a99372 codegen: Print jsdoc comments for `TSEnumMember`s (#6007) (camc314) - 97a2c41 isolated-declarations: False positive for class private getter with non-inferrable return type (#5987) (michaelm) ### Performance - 2b17003 linter, prettier, diagnostics: Use `FxHashMap` instead of `std::collections::HashMap` (#5993) (camchenry) - 7b90d79 transformer: `SparseStack` always keep minimum 1 entry (#5962) (overlookmotel) - 28fe80a transformer: Logical assignment operator transform use `SparseStack` (#5960) (overlookmotel) - 9f7d4b7 transformer: Exponentiation operator transform use `SparseStack` (#5959) (overlookmotel) - 5dc0154 transformer: Nullish coalescing operator transform use `SparseStack` (#5942) (overlookmotel) - 618e89e transformer: Arrow function transform: reduce stack memory usage (#5940) (overlookmotel) ### Documentation - 5a0d17c ast: Document more AST nodes (#6000) (DonIsaac) - 18371dd oxc: Include feature-guarded modules in docs.rs (#6012) (DonIsaac) - 1abfe8f semantic: Document `SymbolTable` (#5998) (DonIsaac) - f5eee72 semantic: Correct docs for `Reference` (#5992) (overlookmotel) - 860f108 transformer: Add to arrow functions transform docs (#5989) (overlookmotel) ### Refactor - 0a2f687 minifier: Move dce conditional expression to `RemoveDeadCode` (#5971) (Boshen) - f02bf51 transformer: Arrow function transform: remove unnecessary assertion (#6002) (overlookmotel) --------- Co-authored-by: Boshen <[email protected]> Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
## [0.9.8] - 2024-09-24 ### Bug Fixes - e3c8a12 linter: Fix panic in sort-keys (#6017) (Boshen) - 4771492 linter: Fix `import/no_cycle` with `ignoreTypes` (#5995) (Boshen) ### Performance - 5ae3f36 linter: `no-fallthrough`: Use string matching instead of Regex for default comment pattern (#6008) (camchenry) - 2b17003 linter, prettier, diagnostics: Use `FxHashMap` instead of `std::collections::HashMap` (#5993) (camchenry) --------- Co-authored-by: Boshen <[email protected]> Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>


Using
FxHashMapis faster thanHashMapin many cases, especially for hashing-heavy workloads. This change improves the performance of the linter, prettier, and diagnostics crates by usingFxHashMapinstead ofstd::collections::HashMap.