Commit e11511d
authored
perf: add reference equality fast path to compareStringsByCodepoint (#770)
When two strings are the same reference (e.g. interned strings from the
Parser pool, or self-comparison in array equality checks), return 0
immediately without doing the O(n) codepoint-by-codepoint comparison.1 parent 661b8b2 commit e11511d
1 file changed
Lines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
135 | 135 | | |
136 | 136 | | |
137 | 137 | | |
| 138 | + | |
| 139 | + | |
138 | 140 | | |
139 | 141 | | |
140 | 142 | | |
| |||
0 commit comments