RFR: 8377427: Reduce substring allocations in Color.web(String, double) [v7]

Michael Strauß mstrauss at openjdk.org
Wed Feb 18 20:07:15 UTC 2026


On Sat, 14 Feb 2026 14:04:08 GMT, Michael Strauß <mstrauss at openjdk.org> wrote:

>> Color.web(string, double) parses a color string by creating substrings of the input. These string allocations can be removed.
>> 
>> CSS numbers are parsed by `CssNumberParser`, which parses CSS-compliant numbers using Lemire's algorithm.
>> 
>> There are no new tests for the `Color` class, since the existing tests already cover all relevant code paths.
>
> Michael Strauß has updated the pull request incrementally with one additional commit since the last revision:
> 
>   review comment

I've included the precomputed powers-of-five table in the code file, so it's available immediately without `BigInteger` calculations.

-------------

PR Comment: https://git.openjdk.org/jfx/pull/2069#issuecomment-3922912849


More information about the openjfx-dev mailing list