Skip to content

Commit

Permalink
perf(es/compat): Migrate class_properties to VisitMut partially (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
kwonoj authored Dec 4, 2021
1 parent 2a01dd4 commit 89af8ab
Show file tree
Hide file tree
Showing 2 changed files with 133 additions and 140 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -737,17 +737,19 @@ impl ClassProperties {
members.push(ClassMember::Constructor(c));
}

extra_stmts.extend(private_method_fn_decls.fold_with(&mut FieldAccessFolder {
private_method_fn_decls.visit_mut_with(&mut FieldAccessFolder {
mark: self.mark,
method_mark: self.method_mark,
private_methods: &private_methods,
statics: &statics,
vars: vec![],
class_name: &class_ident,
in_assign_pat: false,
}));
});

extra_stmts.extend(private_method_fn_decls);

let members = members.fold_with(&mut FieldAccessFolder {
members.visit_mut_with(&mut FieldAccessFolder {
mark: self.mark,
method_mark: self.method_mark,
private_methods: &private_methods,
Expand Down
Loading

1 comment on commit 89af8ab

@github-actions
Copy link

Choose a reason for hiding this comment

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

Benchmark

Benchmark suite Current: 89af8ab Previous: 2a01dd4 Ratio
full_es2015 202673869 ns/iter (± 12190998) 196350510 ns/iter (± 18657189) 1.03
full_es2016 162504110 ns/iter (± 13298411) 152798091 ns/iter (± 9788091) 1.06
full_es2017 171565957 ns/iter (± 14257653) 161643349 ns/iter (± 18103508) 1.06
full_es2018 173082723 ns/iter (± 22075481) 158254125 ns/iter (± 15461303) 1.09
full_es2019 168824592 ns/iter (± 19020573) 159072237 ns/iter (± 20704546) 1.06
full_es2020 171027813 ns/iter (± 14993060) 166404448 ns/iter (± 25902175) 1.03
full_es3 246126833 ns/iter (± 16562515) 223279180 ns/iter (± 28603405) 1.10
full_es5 225094700 ns/iter (± 26015673) 204084920 ns/iter (± 35315399) 1.10
parser 788101 ns/iter (± 90774) 803010 ns/iter (± 98740) 0.98

This comment was automatically generated by workflow using github-action-benchmark.

Please sign in to comment.