RFR: 8286270: [java.desktop] Replace color search in XColors with a switch statement [v2]
SWinxy
duke at openjdk.java.net
Fri May 20 00:53:27 UTC 2022
On Sat, 14 May 2022 17:33:37 GMT, SWinxy <duke at openjdk.java.net> wrote:
>> The current implementation creates ~750 new objects on load, and uses a binary array search with a Comparable implementation. This implementation is probably bad. Instead, we can use the enhanced switch feature to possibly save time, resources, and code size. The new implementation means that the array doesn't have to be sorted alphanumerically necessarily, and it creates the colors on demand.
>
> SWinxy has updated the pull request incrementally with one additional commit since the last revision:
>
> Remove @author tags per request
I did an automated test to see if those were the only other things wrong. Those were the only things that were wrong.
-------------
PR: https://git.openjdk.java.net/jdk/pull/7096
More information about the client-libs-dev
mailing list