Hi Tagir,
Thanks for doing this! This looks like a good optimization. I can sponsor it for
you.
The preliminary patch looks fine. Too bad there's some code duplication. If this
weren't HashMap, I'd suggest refactoring it and using a lambda expression.
However, HashMap is used early in JDK st
Hi,
On 2018-10-01 19:35, Martin Buchholz wrote:
We probably want to check in the jmh benchmark, but not sure where - there
have been recent discussions ... """Reviving JEP 230: Microbenchmark
Suite"""
we have a prototype up and running in the sandbox[1] and I hope to move
forward with the JE
Thanks, Tagir.
I agree these optimizations are worth doing. I have worked on similar
toArray methods in other Collection implementations.
I have a benchmark that is also a correctness test
Collection/IteratorMicroBenchmark.java
but I never added any Set implementations since I intentionally want
Hello!
I think that HashSet.toArray(), HashMap.keySet().toArray() and
HashMap.values().toArray() methods are used often enough to deserve a
dedicated optimized implementation. Here's the patch I propose which
is based on KeySet#forEach and AbstractCollection#toArray
implementations:
http://cr.open