Commit 339c6a1
authored
[XABT] Use SortedSets in
`JCWGenerator.EnsureIdenticalCollections` ensures that every
architecture being built contains the same Java derived types. Because
this includes `Mono.Android.dll`, even the `dotnet new android`
template has ~8500 Java types found. The current implementation uses
nested loops and is O(N²). By first sorting the items into `SortedSet`
types and then using `SetEquals` we can significantly speed up this
operation.
Fresh `dotnet build` of Android template (defaults to 4
architectures), `EnsureIdenticalCollections` takes:
| | |
| - | - |
| `main` | 3081 ms |
| PR | 29 ms |JCWGenerator.EnsureIdenticalCollections for better performance. (#9208)1 parent 654440b commit 339c6a1
1 file changed
+9
-28
lines changedLines changed: 9 additions & 28 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
245 | 245 | | |
246 | 246 | | |
247 | 247 | | |
248 | | - | |
249 | | - | |
| 248 | + | |
| 249 | + | |
250 | 250 | | |
251 | | - | |
252 | | - | |
| 251 | + | |
| 252 | + | |
253 | 253 | | |
254 | 254 | | |
255 | | - | |
256 | | - | |
257 | | - | |
258 | | - | |
259 | | - | |
260 | | - | |
261 | | - | |
262 | | - | |
263 | | - | |
264 | | - | |
265 | | - | |
266 | | - | |
267 | | - | |
268 | | - | |
269 | | - | |
| 255 | + | |
| 256 | + | |
270 | 257 | | |
271 | | - | |
272 | | - | |
273 | | - | |
274 | | - | |
| 258 | + | |
275 | 259 | | |
276 | | - | |
277 | | - | |
278 | | - | |
279 | | - | |
280 | | - | |
| 260 | + | |
| 261 | + | |
281 | 262 | | |
282 | 263 | | |
283 | 264 | | |
| |||
0 commit comments