RFR: 8245309: Re-examine use of ThreadLocalCoders in sun.net.www.ParseUtil [v2]

Aleksey Shipilev shade at openjdk.java.net
Wed Sep 16 06:47:45 UTC 2020


On Tue, 15 Sep 2020 15:43:59 GMT, Julia Boes <jboes at openjdk.org> wrote:

>> Replaced the use of ThreadLocalCoders with regular non-caching CharsetEncoder and added a benchmark to confirm that
>> there is no performance impact.
>
> Julia Boes has updated the pull request incrementally with one additional commit since the last revision:
> 
>   fix typo in test and cleanup benchmark

Benchmark code looks good otherwise.

test/micro/org/openjdk/bench/java/net/ThreadLocalParseUtil.java line 50:

> 48: public class ThreadLocalParseUtil {
> 49:
> 50:     private static final MethodHandles.Lookup LOOKUP;

(carry over from previous review) `LOOKUP` can still be a local variable in `<clinit>`.

-------------

Marked as reviewed by shade (Reviewer).

PR: https://git.openjdk.java.net/jdk/pull/170


More information about the net-dev mailing list