Commit fa5e197
Implement equality for Values
Equality doesn't require the same amount of sophistication than ordering
comparison. Implement an Equal function that does just that but does it
much faster.
Benchmark results show up to 96% improvement:
```
benchmark old ns/op new ns/op delta
BenchmarkDeducedSimple-12 110083 103256 -6.20%
BenchmarkDeducedNested-12 374366 374160 -0.06%
BenchmarkDeducedNestedAcrossVersion-12 392864 405525 +3.22%
BenchmarkLeafConflictAcrossVersion-12 89112 89070 -0.05%
BenchmarkMultipleApplierRecursiveRealConversion-12 1564330 1574620 +0.66%
BenchmarkOperations/Pod/Create-12 103693 103970 +0.27%
BenchmarkOperations/Pod/Apply-12 291760 291317 -0.15%
BenchmarkOperations/Pod/Update-12 193419 190470 -1.52%
BenchmarkOperations/Pod/UpdateVersion-12 261692 251966 -3.72%
BenchmarkOperations/Node/Create-12 152047 155710 +2.41%
BenchmarkOperations/Node/Apply-12 499187 473901 -5.07%
BenchmarkOperations/Node/Update-12 299271 279142 -6.73%
BenchmarkOperations/Node/UpdateVersion-12 438723 403125 -8.11%
BenchmarkOperations/Endpoints/Create-12 12246 11940 -2.50%
BenchmarkOperations/Endpoints/Apply-12 915806 924080 +0.90%
BenchmarkOperations/Endpoints/Update-12 7155675 285092 -96.02%
BenchmarkOperations/Endpoints/UpdateVersion-12 14278150 544040 -96.19%
BenchmarkOperations/CustomResourceDefinition/Create-12 1312734 1288472 -1.85%
BenchmarkOperations/CustomResourceDefinition/Apply-12 3346591 3376864 +0.90%
BenchmarkOperations/CustomResourceDefinition/Update-12 10681243 1758764 -83.53%
BenchmarkOperations/CustomResourceDefinition/UpdateVersion-12 19069925 2202330 -88.45%
```1 parent 6149e45 commit fa5e197
2 files changed
+91
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
296 | 296 | | |
297 | 297 | | |
298 | 298 | | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
299 | 302 | | |
300 | 303 | | |
301 | 304 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
39 | | - | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
40 | 96 | | |
41 | 97 | | |
42 | 98 | | |
| |||
134 | 190 | | |
135 | 191 | | |
136 | 192 | | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
137 | 207 | | |
138 | 208 | | |
139 | 209 | | |
| |||
191 | 261 | | |
192 | 262 | | |
193 | 263 | | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
194 | 281 | | |
195 | 282 | | |
196 | 283 | | |
| |||
0 commit comments