Integrated: 8370013: Refactor Double.toHexString to eliminate regex and StringBuilder

2025-10-23 Thread Shaojin Wen
penjdk.org/jdk/commit/586235896536cde293402167775d4d60f1426a9e Stats: 291 lines in 4 files changed: 157 ins; 101 del; 33 mod 8370013: Refactor Double.toHexString to eliminate regex and StringBuilder Reviewed-by: rgiulietti, darcy - PR: https://git.openjdk.org/jdk/pull/27811

Re: RFR: 8370013: Refactor Double.toHexString to eliminate regex and StringBuilder [v14]

2025-10-22 Thread Joe Darcy
On Tue, 21 Oct 2025 11:29:07 GMT, Shaojin Wen wrote: >> This PR refactors the Double.toHexString method to improve its performance >> by eliminating the use of StringBuilder and regex operations. The new >> implementation uses a direct byte array approach to construct the hex string >> represe

Re: RFR: 8370013: Refactor Double.toHexString to eliminate regex and StringBuilder [v14]

2025-10-21 Thread Raffaello Giulietti
On Tue, 21 Oct 2025 11:29:07 GMT, Shaojin Wen wrote: >> This PR refactors the Double.toHexString method to improve its performance >> by eliminating the use of StringBuilder and regex operations. The new >> implementation uses a direct byte array approach to construct the hex string >> represe

Re: RFR: 8370013: Refactor Double.toHexString to eliminate regex and StringBuilder [v14]

2025-10-21 Thread Shaojin Wen
> This PR refactors the Double.toHexString method to improve its performance by > eliminating the use of StringBuilder and regex operations. The new > implementation uses a direct byte array approach to construct the hex string > representation, which avoids the overhead of StringBuilder operati

Re: RFR: 8370013: Refactor Double.toHexString to eliminate regex and StringBuilder [v12]

2025-10-21 Thread Raffaello Giulietti
On Tue, 21 Oct 2025 07:28:16 GMT, Raffaello Giulietti wrote: >> src/java.base/share/classes/java/lang/Double.java line 768: >> >>> 766: // Integer.digits maps values 0-15 to '0'-'f' characters >>> 767: chars[index++] = Integer.digits[((int)(signifBits >> ((12 >>> - i) <

Re: RFR: 8370013: Refactor Double.toHexString to eliminate regex and StringBuilder [v12]

2025-10-21 Thread Raffaello Giulietti
On Tue, 21 Oct 2025 05:14:48 GMT, Shaojin Wen wrote: >> This PR refactors the Double.toHexString method to improve its performance >> by eliminating the use of StringBuilder and regex operations. The new >> implementation uses a direct byte array approach to construct the hex string >> represe

Re: RFR: 8370013: Refactor Double.toHexString to eliminate regex and StringBuilder [v13]

2025-10-21 Thread Shaojin Wen
> This PR refactors the Double.toHexString method to improve its performance by > eliminating the use of StringBuilder and regex operations. The new > implementation uses a direct byte array approach to construct the hex string > representation, which avoids the overhead of StringBuilder operati

Re: RFR: 8370013: Refactor Double.toHexString to eliminate regex and StringBuilder [v12]

2025-10-21 Thread Raffaello Giulietti
On Tue, 21 Oct 2025 07:22:47 GMT, Raffaello Giulietti wrote: >> Shaojin Wen has updated the pull request with a new target base due to a >> merge or a rebase. The pull request now contains 17 commits: >> >> - codestyle >> - Merge remote-tracking branch 'upstream/master' into float_to_hex_str

Re: RFR: 8370013: Refactor Double.toHexString to eliminate regex and StringBuilder [v12]

2025-10-20 Thread Shaojin Wen
> This PR refactors the Double.toHexString method to improve its performance by > eliminating the use of StringBuilder and regex operations. The new > implementation uses a direct byte array approach to construct the hex string > representation, which avoids the overhead of StringBuilder operati

Re: RFR: 8370013: Refactor Double.toHexString to eliminate regex and StringBuilder [v11]

2025-10-20 Thread Shaojin Wen
> This PR refactors the Double.toHexString method to improve its performance by > eliminating the use of StringBuilder and regex operations. The new > implementation uses a direct byte array approach to construct the hex string > representation, which avoids the overhead of StringBuilder operati

Re: RFR: 8370013: Refactor Double.toHexString to eliminate regex and StringBuilder [v10]

2025-10-20 Thread Shaojin Wen
> This PR refactors the Double.toHexString method to improve its performance by > eliminating the use of StringBuilder and regex operations. The new > implementation uses a direct byte array approach to construct the hex string > representation, which avoids the overhead of StringBuilder operati

Re: RFR: 8370013: Refactor Double.toHexString to eliminate regex and StringBuilder [v9]

2025-10-20 Thread Joe Darcy
On Tue, 21 Oct 2025 01:28:50 GMT, Shaojin Wen wrote: >> This PR refactors the Double.toHexString method to improve its performance >> by eliminating the use of StringBuilder and regex operations. The new >> implementation uses a direct byte array approach to construct the hex string >> represe

Re: RFR: 8370013: Refactor Double.toHexString to eliminate regex and StringBuilder [v9]

2025-10-20 Thread Joe Darcy
On Tue, 21 Oct 2025 01:28:50 GMT, Shaojin Wen wrote: >> This PR refactors the Double.toHexString method to improve its performance >> by eliminating the use of StringBuilder and regex operations. The new >> implementation uses a direct byte array approach to construct the hex string >> represe

Re: RFR: 8370013: Refactor Double.toHexString to eliminate regex and StringBuilder [v9]

2025-10-20 Thread Shaojin Wen
> This PR refactors the Double.toHexString method to improve its performance by > eliminating the use of StringBuilder and regex operations. The new > implementation uses a direct byte array approach to construct the hex string > representation, which avoids the overhead of StringBuilder operati

Re: RFR: 8370013: Refactor Double.toHexString to eliminate regex and StringBuilder [v2]

2025-10-20 Thread Shaojin Wen
On Mon, 20 Oct 2025 08:58:07 GMT, Andrew Haley wrote: >> Shaojin Wen has updated the pull request incrementally with one additional >> commit since the last revision: >> >> from @jddarcy > > src/java.base/share/classes/java/lang/Double.java line 771: > >> 769: // Shift ri

Re: RFR: 8370013: Refactor Double.toHexString to eliminate regex and StringBuilder [v8]

2025-10-20 Thread Shaojin Wen
> This PR refactors the Double.toHexString method to improve its performance by > eliminating the use of StringBuilder and regex operations. The new > implementation uses a direct byte array approach to construct the hex string > representation, which avoids the overhead of StringBuilder operati

Re: RFR: 8370013: Refactor Double.toHexString to eliminate regex and StringBuilder [v7]

2025-10-20 Thread Raffaello Giulietti
On Mon, 20 Oct 2025 15:37:40 GMT, Shaojin Wen wrote: >> This PR refactors the Double.toHexString method to improve its performance >> by eliminating the use of StringBuilder and regex operations. The new >> implementation uses a direct byte array approach to construct the hex string >> represe

Re: RFR: 8370013: Refactor Double.toHexString to eliminate regex and StringBuilder

2025-10-20 Thread Shaojin Wen
On Wed, 15 Oct 2025 00:02:58 GMT, Shaojin Wen wrote: >> This PR refactors the Double.toHexString method to improve its performance >> by eliminating the use of StringBuilder and regex operations. The new >> implementation uses a direct byte array approach to construct the hex string >> represe

Re: RFR: 8370013: Refactor Double.toHexString to eliminate regex and StringBuilder [v7]

2025-10-20 Thread Shaojin Wen
> This PR refactors the Double.toHexString method to improve its performance by > eliminating the use of StringBuilder and regex operations. The new > implementation uses a direct byte array approach to construct the hex string > representation, which avoids the overhead of StringBuilder operati

Re: RFR: 8370013: Refactor Double.toHexString to eliminate regex and StringBuilder

2025-10-20 Thread Joe Darcy
On Mon, 20 Oct 2025 04:40:45 GMT, Joe Darcy wrote: > The existing regression tests may be adequate for this refactoring as the > high-level algorithm and special cases are similar, but I'll want to take > another look before approving this PR. Thanks. Looking over test/jdk/java/lang/ToHexStrin

Re: RFR: 8370013: Refactor Double.toHexString to eliminate regex and StringBuilder [v6]

2025-10-20 Thread Shaojin Wen
> This PR refactors the Double.toHexString method to improve its performance by > eliminating the use of StringBuilder and regex operations. The new > implementation uses a direct byte array approach to construct the hex string > representation, which avoids the overhead of StringBuilder operati

Re: RFR: 8370013: Refactor Double.toHexString to eliminate regex and StringBuilder [v5]

2025-10-20 Thread Shaojin Wen
> This PR refactors the Double.toHexString method to improve its performance by > eliminating the use of StringBuilder and regex operations. The new > implementation uses a direct byte array approach to construct the hex string > representation, which avoids the overhead of StringBuilder operati

Re: RFR: 8370013: Refactor Double.toHexString to eliminate regex and StringBuilder

2025-10-20 Thread Raffaello Giulietti
On Wed, 15 Oct 2025 00:02:58 GMT, Shaojin Wen wrote: >> This PR refactors the Double.toHexString method to improve its performance >> by eliminating the use of StringBuilder and regex operations. The new >> implementation uses a direct byte array approach to construct the hex string >> represe

Re: RFR: 8370013: Refactor Double.toHexString to eliminate regex and StringBuilder [v4]

2025-10-20 Thread Shaojin Wen
> This PR refactors the Double.toHexString method to improve its performance by > eliminating the use of StringBuilder and regex operations. The new > implementation uses a direct byte array approach to construct the hex string > representation, which avoids the overhead of StringBuilder operati

Re: RFR: 8370013: Refactor Double.toHexString to eliminate regex and StringBuilder [v3]

2025-10-20 Thread Shaojin Wen
> This PR refactors the Double.toHexString method to improve its performance by > eliminating the use of StringBuilder and regex operations. The new > implementation uses a direct byte array approach to construct the hex string > representation, which avoids the overhead of StringBuilder operati

Re: RFR: 8370013: Refactor Double.toHexString to eliminate regex and StringBuilder [v2]

2025-10-20 Thread Raffaello Giulietti
On Mon, 20 Oct 2025 14:11:31 GMT, Raffaello Giulietti wrote: >> Shaojin Wen has updated the pull request incrementally with one additional >> commit since the last revision: >> >> from @jddarcy > > src/java.base/share/classes/java/lang/Double.java line 713: > >> 711: else { >> 712:

Re: RFR: 8370013: Refactor Double.toHexString to eliminate regex and StringBuilder [v2]

2025-10-20 Thread Raffaello Giulietti
On Mon, 20 Oct 2025 06:34:39 GMT, Shaojin Wen wrote: >> This PR refactors the Double.toHexString method to improve its performance >> by eliminating the use of StringBuilder and regex operations. The new >> implementation uses a direct byte array approach to construct the hex string >> represe

Re: RFR: 8370013: Refactor Double.toHexString to eliminate regex and StringBuilder [v2]

2025-10-20 Thread Raffaello Giulietti
On Mon, 20 Oct 2025 08:59:16 GMT, Andrew Haley wrote: >> Shaojin Wen has updated the pull request incrementally with one additional >> commit since the last revision: >> >> from @jddarcy > > src/java.base/share/classes/java/lang/Double.java line 712: > >> 710: return Double.toStr

Re: RFR: 8370013: Refactor Double.toHexString to eliminate regex and StringBuilder [v2]

2025-10-20 Thread Andrew Haley
On Mon, 20 Oct 2025 06:34:39 GMT, Shaojin Wen wrote: >> This PR refactors the Double.toHexString method to improve its performance >> by eliminating the use of StringBuilder and regex operations. The new >> implementation uses a direct byte array approach to construct the hex string >> represe

Re: RFR: 8370013: Refactor Double.toHexString to eliminate regex and StringBuilder [v2]

2025-10-19 Thread Shaojin Wen
> This PR refactors the Double.toHexString method to improve its performance by > eliminating the use of StringBuilder and regex operations. The new > implementation uses a direct byte array approach to construct the hex string > representation, which avoids the overhead of StringBuilder operati

Re: RFR: 8370013: Refactor Double.toHexString to eliminate regex and StringBuilder

2025-10-19 Thread Joe Darcy
On Tue, 14 Oct 2025 23:26:00 GMT, Shaojin Wen wrote: > This PR refactors the Double.toHexString method to improve its performance by > eliminating the use of StringBuilder and regex operations. The new > implementation uses a direct byte array approach to construct the hex string > representat

Re: RFR: 8370013: Refactor Double.toHexString to eliminate regex and StringBuilder

2025-10-19 Thread Joe Darcy
On Tue, 14 Oct 2025 23:26:00 GMT, Shaojin Wen wrote: > This PR refactors the Double.toHexString method to improve its performance by > eliminating the use of StringBuilder and regex operations. The new > implementation uses a direct byte array approach to construct the hex string > representat

Re: RFR: 8370013: Refactor Double.toHexString to eliminate regex and StringBuilder

2025-10-17 Thread Raffaello Giulietti
On Wed, 15 Oct 2025 00:02:58 GMT, Shaojin Wen wrote: >> This PR refactors the Double.toHexString method to improve its performance >> by eliminating the use of StringBuilder and regex operations. The new >> implementation uses a direct byte array approach to construct the hex string >> represe

Re: RFR: 8370013: Refactor Double.toHexString to eliminate regex and StringBuilder

2025-10-16 Thread Shaojin Wen
On Tue, 14 Oct 2025 23:26:00 GMT, Shaojin Wen wrote: > This PR refactors the Double.toHexString method to improve its performance by > eliminating the use of StringBuilder and regex operations. The new > implementation uses a direct byte array approach to construct the hex string > representat

RFR: 8370013: Refactor Double.toHexString to eliminate regex and StringBuilder

2025-10-16 Thread Shaojin Wen
This PR refactors the Double.toHexString method to improve its performance by eliminating the use of StringBuilder and regex operations. The new implementation uses a direct byte array approach to construct the hex string representation, which avoids the overhead of StringBuilder operations and

Refactor Double.toHexString to eliminate regex and StringBuilder

2025-10-16 Thread wenshao
Referencing jddarcy's 8369312: Refactor Float.toHexString() to avoid use of regex (https://github.com/openjdk/jdk/pull/27780 ), we can further eliminate the regex and StringBuilder in Double.toHexString to improve performance. To make my proposal easie