Repository navigation
Commit 12b414a
authored
perf(javascript): push and pop only the stack in collapse_vars' scanners (#22554)
Every node `collapse_vars` scans went through the walker's general push
and pop, which track directives and classes. Its scanner and its
multi-read replacer read no directive, only the parents `parent` and
`find_scope` look up, so they now push and pop nothing but the stack.
Minifying lodash.js runs 0.71% fewer instructions under CodSpeed's
simulation flags.1 parent 6e6a464 commit 12b414a
1 file changed
Lines changed: 34 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25999 | 25999 | | |
26000 | 26000 | | |
26001 | 26001 | | |
| 26002 | + | |
| 26003 | + | |
| 26004 | + | |
| 26005 | + | |
| 26006 | + | |
| 26007 | + | |
| 26008 | + | |
| 26009 | + | |
| 26010 | + | |
| 26011 | + | |
| 26012 | + | |
| 26013 | + | |
| 26014 | + | |
| 26015 | + | |
| 26016 | + | |
| 26017 | + | |
| 26018 | + | |
| 26019 | + | |
| 26020 | + | |
| 26021 | + | |
| 26022 | + | |
| 26023 | + | |
| 26024 | + | |
26002 | 26025 | | |
26003 | 26026 | | |
26004 | 26027 | | |
| |||
26059 | 26082 | | |
26060 | 26083 | | |
26061 | 26084 | | |
26062 | | - | |
26063 | | - | |
26064 | | - | |
26065 | | - | |
| 26085 | + | |
| 26086 | + | |
| 26087 | + | |
| 26088 | + | |
| 26089 | + | |
| 26090 | + | |
26066 | 26091 | | |
26067 | | - | |
26068 | | - | |
| 26092 | + | |
| 26093 | + | |
| 26094 | + | |
| 26095 | + | |
| 26096 | + | |
26069 | 26097 | | |
26070 | 26098 | | |
26071 | 26099 | | |
| |||
0 commit comments