RFR(S): 8055032: Improve numerical parsing in java.net and sun.net
Claes Redestad
claes.redestad at oracle.com
Thu Aug 14 09:32:30 UTC 2014
On 08/14/2014 09:37 AM, Alan Bateman wrote:
> On 13/08/2014 15:02, Claes Redestad wrote:
>> Hi,
>>
>> can I have a review for this patch to take advantage of offset-based
>> parseInt methods added in
>> 8041972 for java.net/sun.net classes?
>>
>> bug: https://bugs.openjdk.java.net/browse/JDK-8055032
>> webrev: http://cr.openjdk.java.net/~redestad/8055032/webrev.0
>>
>> This causes fewer temporary String objects to be allocated and shows
>> a direct throughput improvement
>> in micros (1.2x in java.net.URLDecoder#decode and
>> sun.net.www.ParseUtil#decode, for example)
> These changes look okay to although the downside is that it's less
> readable in a few places.
Thanks for looking at this, Alan!
Any particular place where you think readability becomes a problem? I've
grown fond of the
parseInt(s, radix, offset) form myself, but I'm biased. ;-)
>
> Are there micro benchmarks being created as part of this work? If so,
> are they being pushed to a repository in OpenJDK for use by others?
We currently don't have a suitable landing place for microbenchmarks in
the OpenJDK. I hope to one day
be able to push benchmarks together with changesets like these.
I have a few internal benchmarks where I've extensively benchmarked the
new parseInt methods and some
sanity tests to ensure it gives reasonable benefits for public methods
like java.net.URLDecoder::decode
/Claes
>
> -Alan
More information about the net-dev
mailing list