RFR: 8377427: Reduce substring allocations in Color.web(String, double) [v16]
Andy Goryachev
angorya at openjdk.org
Mon Feb 23 21:50:56 UTC 2026
On Mon, 23 Feb 2026 21:33:21 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
Thanks for adding the tests! (You did not have to add me as a contributor)
Nice touch with `LongConsumer` and `Math.nextUp`/`nextDown`.
-------------
Marked as reviewed by angorya (Reviewer).
PR Review: https://git.openjdk.org/jfx/pull/2069#pullrequestreview-3843703317
More information about the openjfx-dev
mailing list