Skip to content

Commit

Permalink
perf(es/minifier): Prevent double boxing
Browse files Browse the repository at this point in the history
  • Loading branch information
kdy1 committed Feb 21, 2025
1 parent e5ea286 commit a69d66c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions crates/swc_ecma_minifier/src/program_data.rs
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ pub(crate) struct VarUsageInfo {
/// PR. (because it's hard to review)
infects_to: Vec<Access>,
/// Only **string** properties.
pub(crate) accessed_props: Box<FxHashMap<Atom, u32>>,
pub(crate) accessed_props: FxHashMap<Atom, u32>,

pub(crate) used_recursively: bool,
}
Expand Down Expand Up @@ -294,7 +294,7 @@ impl Storage for ProgramData {

e.get_mut().assigned_fn_local &= var_info.assigned_fn_local;

for (k, v) in *var_info.accessed_props {
for (k, v) in var_info.accessed_props {
*e.get_mut().accessed_props.entry(k).or_default() += v;
}

Expand Down

0 comments on commit a69d66c

Please sign in to comment.