-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
perf(es/codegen): Optimize using
swc_allocator
(#9294)
- Loading branch information
Showing
12 changed files
with
66 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
swc_allocator: patch | ||
swc_ecma_codegen: patch | ||
--- | ||
|
||
perf(es/codegen): Optimize using `swc_allocator` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -61,4 +61,7 @@ pkg/ | |
|
||
# Used by scripts | ||
*.tmp.txt | ||
swc-core-*.tgz | ||
swc-core-*.tgz | ||
|
||
# samply | ||
profile.json |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
//! Various collections. | ||
|
||
use std::hash::BuildHasherDefault; | ||
|
||
use rustc_hash::FxHasher; | ||
|
||
#[cfg(feature = "nightly")] | ||
use crate::FastAlloc; | ||
|
||
/// See [std::collections::HashMap]. | ||
#[cfg(feature = "nightly")] | ||
pub type HashMap<K, V, S> = hashbrown::HashMap<K, V, S, FastAlloc>; | ||
|
||
/// See [std::collections::HashSet]. | ||
#[cfg(feature = "nightly")] | ||
pub type HashSet<T, S> = hashbrown::HashSet<T, S, FastAlloc>; | ||
|
||
/// See [std::collections::HashMap]. | ||
#[cfg(not(feature = "nightly"))] | ||
pub type HashMap<K, V, S> = hashbrown::HashMap<K, V, S>; | ||
|
||
#[cfg(not(feature = "nightly"))] | ||
/// See [std::collections::HashSet]. | ||
pub type HashSet<T, S> = hashbrown::HashSet<T, S>; | ||
|
||
/// Used for `FxHashMap` and `FxHashSet`. | ||
pub type FxBuildHasher = BuildHasherDefault<FxHasher>; | ||
|
||
/// Faster `HashMap` which uses `FxHasher`. | ||
pub type FxHashMap<K, V> = HashMap<K, V, FxBuildHasher>; | ||
|
||
/// Faster `HashSet` which uses `FxHasher`. | ||
pub type FxHashSet<T> = HashSet<T, FxBuildHasher>; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters