RFR: 8246451: Reduce overhead of normalizing file paths with trailing slash
Claes Redestad
claes.redestad at oracle.com
Wed Jun 3 11:54:00 UTC 2020
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
More information about the core-libs-dev
mailing list