RFR: 8286270: [java.desktop] Replace color search in XColors with a switch statement [v2]
SWinxy
duke at openjdk.java.net
Sat May 14 17:33:37 UTC 2022
> 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
-------------
Changes:
- all: https://git.openjdk.java.net/jdk/pull/7096/files
- new: https://git.openjdk.java.net/jdk/pull/7096/files/67335f7d..79f3ddf7
Webrevs:
- full: https://webrevs.openjdk.java.net/?repo=jdk&pr=7096&range=01
- incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=7096&range=00-01
Stats: 3 lines in 1 file changed: 0 ins; 3 del; 0 mod
Patch: https://git.openjdk.java.net/jdk/pull/7096.diff
Fetch: git fetch https://git.openjdk.java.net/jdk pull/7096/head:pull/7096
PR: https://git.openjdk.java.net/jdk/pull/7096
More information about the client-libs-dev
mailing list