Commit be7b059
authored
Short-circuit value equality with an identity check (#6372)
We often reuse instances of objects with value semantics, and in such
cases equality checking can be short-circuited by first checking for
object identity before falling back to actually comparing the values of
two objects.
Review: @95-martin-orion1 parent 7578110 commit be7b059
1 file changed
Lines changed: 4 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
70 | 70 | | |
71 | 71 | | |
72 | 72 | | |
| 73 | + | |
| 74 | + | |
73 | 75 | | |
74 | 76 | | |
75 | 77 | | |
| |||
91 | 93 | | |
92 | 94 | | |
93 | 95 | | |
| 96 | + | |
| 97 | + | |
94 | 98 | | |
95 | 99 | | |
96 | 100 | | |
| |||
0 commit comments