Commit 657f818
assert,util: improve unequal number comparison performance
This improves the performance to compare unequal numbers while doing
a deep equal comparison. Comparing for NaN is faster by checking
`variable !== variable` than by using `Number.isNaN()`.
PR-URL: #57619
Reviewed-By: Jordan Harband <ljharb@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Edy Silva <edigleyssonsilva@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>1 parent b9c9bf4 commit 657f818
1 file changed
+9
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
12 | 11 | | |
13 | 12 | | |
14 | 13 | | |
| |||
185 | 184 | | |
186 | 185 | | |
187 | 186 | | |
188 | | - | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
189 | 190 | | |
190 | 191 | | |
191 | 192 | | |
| |||
197 | 198 | | |
198 | 199 | | |
199 | 200 | | |
200 | | - | |
201 | | - | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
202 | 204 | | |
203 | 205 | | |
204 | 206 | | |
| |||
501 | 503 | | |
502 | 504 | | |
503 | 505 | | |
504 | | - | |
| 506 | + | |
| 507 | + | |
| 508 | + | |
505 | 509 | | |
506 | 510 | | |
507 | 511 | | |
| |||
0 commit comments