RFR: 8193034: Optimize URL.toExternalForm

Chris Hegarty chris.hegarty at oracle.com
Tue Dec 12 10:30:27 UTC 2017


Martin,

I think your changes are good. Thanks for sharing your benchmark
and results.

-Chris.

On 11/12/17 17:24, Martin Buchholz wrote:
> There's now a Martin-style benchmark at
> http://cr.openjdk.java.net/~martin/webrevs/jdk/URLMicroBenchmark/
> that suggests the code is ~ 25% faster with default JVM flags (C2) but ~ 
> 25% slower with C1, as you might expect with multiple String 
> concatenation.  I think we want to optimize for the default and assume 
> that multiple String concatenation does in fact get optimized.
> I'm not planning to check in the benchmark code.
> 
> On Tue, Dec 5, 2017 at 2:10 AM, Chris Hegarty <chris.hegarty at oracle.com 
> <mailto:chris.hegarty at oracle.com>> wrote:
> 
> 
>      > On 5 Dec 2017, at 04:01, Martin Buchholz <martinrb at google.com
>     <mailto:martinrb at google.com>> wrote:
>      >
>      >
>     http://cr.openjdk.java.net/~martin/webrevs/jdk/URL.toExternalForm/
>     <http://cr.openjdk.java.net/~martin/webrevs/jdk/URL.toExternalForm/>
> 
>     Since the motivation for this change is performance, do you have any
>     performance numbers / benchmarks that you can share?
> 
>     -Chris.
> 
> 


More information about the net-dev mailing list