RFR: 8246451: Reduce overhead of normalizing file paths with trailing slash

Claes Redestad claes.redestad at oracle.com
Wed Jun 3 14:47:05 UTC 2020


On 2020-06-03 16:24, Lance Andersen wrote:
> Hi Claes,
> 
> This looks OK :-)

Thank you, Lance!

/Claes

> 
> Best
> Lance
> 
>> On Jun 3, 2020, at 7:54 AM, Claes Redestad <claes.redestad at oracle.com 
>> <mailto:claes.redestad at oracle.com>> wrote:
>>
>> Hi,
>>
>> I'd like to fix a bug in the microbenchmark I pushed for JDK-8246338
>> where the FileOpen.trailingSlash variant doesn't do what it intends to.
>>
>> There's also a profitable low-hanging optimization down that path to
>> substring rather than take the detour via StringBuilder[1]
>>
>> Bug: https://bugs.openjdk.java.net/browse/JDK-8246451
>> Webrev: http://cr.openjdk.java.net/~redestad/8246451/open.00/
>>
>> Testing: tier1
>>
>> Thanks!
>>
>> /Claes
>>
>> [1]
>> Benchmark                                                Mode  Cnt 
>> Score     Error   Units
>> FileOpen.trailingSlash                                   avgt    5 
>> 0.054 ±   0.010   us/op
>> FileOpen.trailingSlash:·gc.alloc.rate.norm               avgt    5 
>> 160.013 ±   0.003    B/op
>>
>> FileOpen.trailingSlash                                   avgt    5 
>> 0.036 ±   0.003   us/op
>> FileOpen.trailingSlash:·gc.alloc.rate.norm               avgt    5 
>> 96.008 ±   0.002    B/op
> 
> <http://oracle.com/us/design/oracle-email-sig-198324.gif>
> <http://oracle.com/us/design/oracle-email-sig-198324.gif><http://oracle.com/us/design/oracle-email-sig-198324.gif>
> <http://oracle.com/us/design/oracle-email-sig-198324.gif>Lance Andersen| 
> Principal Member of Technical Staff | +1.781.442.2037
> Oracle Java Engineering
> 1 Network Drive
> Burlington, MA 01803
> Lance.Andersen at oracle.com <mailto:Lance.Andersen at oracle.com>
> 
> 
> 


More information about the core-libs-dev mailing list