RFR 8017540: Improve multi-threaded contention behavior of BigInteger.toString() radix conversion cache
Aleksey Shipilev
aleksey.shipilev at oracle.com
Tue Jun 25 08:40:28 UTC 2013
On 06/25/2013 03:53 AM, Brian Burkhalter wrote:
> http://cr.openjdk.java.net/~bpb/8017540/
Thanks! Looks good to me.
Rather minor silly nit:
cacheLine = Arrays.copyOf(cacheLine, exponent + 1);
for (int i = oldSize; i <= exponent; i++) {
...is probably more consistent as:
cacheLine = Arrays.copyOf(cacheLine, exponent + 1);
for (int i = oldSize; i < exponent + 1; i++) {
This sets up easier subexpression elimination, and also "1" is now
clearly acts as the "prefetch distance". Although this is the slowpath
anyway, and does not really matter.
-Aleksey.
(the rural r reviewer)
More information about the core-libs-dev
mailing list