RFR: 8353013: java.net.URI.create(String) may have low performance to scan the host/domain name from URI string when the hostname starts with number

2025-04-11 Thread Rohitash
`scanByte` throws `NumberFormatException` for URIs that start with numbers, e.g., https://.x.y/ The current flow is `parseIPv4Address` → `scanIPv4Address` → `scanByte`. `parseIPv4Address` uses `NumberFormatException` for control flow, so it captures the exception, ignores it, and returns

Re: RFR: 8353013: java.net.URI.create(String) may have low performance to scan the host/domain name from URI string when the hostname starts with number

2025-04-11 Thread Rohitash
On Fri, 28 Mar 2025 15:19:46 GMT, Rohitash wrote: > `scanByte` throws `NumberFormatException` for URIs that start with numbers, > e.g., https://.x.y/ > The current flow is `parseIPv4Address` → `scanIPv4Address` → `scanByte`. > `parseIPv4Address` uses `NumberFormatException`

Re: RFR: 8353013: java.net.URI.create(String) may have low performance to scan the host/domain name from URI string when the hostname starts with number

2025-04-11 Thread Rohitash
On Mon, 31 Mar 2025 12:40:27 GMT, Mikhail Yankelevich wrote: >> `scanByte` throws `NumberFormatException` for URIs that start with numbers, >> e.g., https://.x.y/ >> The current flow is `parseIPv4Address` → `scanIPv4Address` → `scanByte`. >> `parseIPv4Address` uses `NumberFormatExcepti

Re: RFR: 8353013: java.net.URI.create(String) may have low performance to scan the host/domain name from URI string when the hostname starts with number [v2]

2025-04-14 Thread Rohitash
On Mon, 14 Apr 2025 12:12:21 GMT, Daniel Fuchs wrote: >> Rohitash has updated the pull request incrementally with two additional >> commits since the last revision: >> >> - Add benchmark >> - Address PR comments > > test/jdk/java/net

Re: RFR: 8353013: java.net.URI.create(String) may have low performance to scan the host/domain name from URI string when the hostname starts with number [v2]

2025-04-14 Thread Rohitash
avgt 10 264.017 ± > 7.274 ns/op > URIBenchMark.oldImplWithNormalUrl avgt 10 233.853 ± > 6.539 ns/op > URIBenchMark.oldImplWithNumUrlavgt 10 1183.572 ± > 29.242 ns/op > > > I ran follow

Re: RFR: 8353013: java.net.URI.create(String) may have low performance to scan the host/domain name from URI string when the hostname starts with number [v3]

2025-04-16 Thread Rohitash
calls to `Integer.parseInt` > if the number of digits in the octet is > 3. > > > I ran following tests. > > make test-tier1 > make test-tier2 > make test TEST=jdk/java/net Rohitash has updated the pull request incrementally with one additional commit since the la

Re: RFR: 8353013: java.net.URI.create(String) may have low performance to scan the host/domain name from URI string when the hostname starts with number [v2]

2025-04-15 Thread Rohitash
On Sat, 12 Apr 2025 06:06:58 GMT, Alan Bateman wrote: >> Rohitash has updated the pull request incrementally with two additional >> commits since the last revision: >> >> - Add benchmark >> - Address PR comments > > test/jdk/java/net/URI/Test.

Integrated: 8353013: java.net.URI.create(String) may have low performance to scan the host/domain name from URI string when the hostname starts with number

2025-04-16 Thread Rohitash Kumar
On Fri, 28 Mar 2025 15:19:46 GMT, Rohitash Kumar wrote: > `scanByte` throws `NumberFormatException` for URIs that start with numbers, > e.g., https://.x.y/ > The current flow is `parseIPv4Address` → `scanIPv4Address` → `scanByte`. > `parseIPv4Address` uses `NumberFormatEx