rich7420 commented on PR #11138:
URL: https://github.com/apache/ozone/pull/11138#issuecomment-5449925206
Quick JMH check of the unused-part scan (`ArrayList.contains` vs `HashSet`,
JDK 21):
```
parts ArrayList HashSet
1000 212 us 2.0 us
10000 26.8 ms 25 us
```
O(n^2) -> O(n) under the bucket write lock. Per-op allocation is unchanged
(both autobox the probed part number), so this is a CPU-time win, not GC.
Negligible for typical small uploads; it matters for large-part completes.
Standalone JMH, not part of the PR.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]