Re: RFR: 6356745: (coll) Add PriorityQueue(Collection, Comparator) [v4]

2023-12-24 Thread jmehrens
On Tue, 19 Dec 2023 21:17:02 GMT, Valeh Hajiyev wrote: >> This commit addresses the current limitation in the `PriorityQueue` >> implementation, which lacks a constructor to efficiently create a priority >> queue with a custom comparator and an existing collection. In order to >> create such a

Optimize RandomGenerator::nextBytes

2023-12-24 Thread Glavo
I created a PR[1] to optimize the implementation of `nextBytes` in Random and RandomGenerator by using Unsafe and ByteArrayLittleEndian. JMH benchmarking says it's very useful, with performance improvements of up to 180% in some cases. Would anyone like to take a look at it? Glavo [1]: https:/

Re: Should Class.name field be @Stable?

2023-12-24 Thread -
After another peek, I find a few other fields in Class can benefit from @Stable too: classData, packageName, allPermDomain, reflectionFactory, classValueMap. They are all accessed with benign race. There are other fields I'm interested in promoting to @Stable, most notably enumConstants and enumCo