The current implementation of `Renderer.getPeerInstance()` looks up mappings by 
concatenating strings to form a combined key:

peer = peerCache.get(name + "_" + unrollCount);


This can be improved by not using strings to store the combined key, but using 
a simple `PeerCacheKey` class instead.
The `Renderer` class then uses a single reusable `PeerCacheKey` object to look 
up mappings, making the lookup allocation-free.

No new tests are added, as existing tests already cover the code.

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

Commit messages:
 - Allocation-free map lookup

Changes: https://git.openjdk.org/jfx/pull/2091/files
  Webrev: https://webrevs.openjdk.org/?repo=jfx&pr=2091&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8378895
  Stats: 53 lines in 1 file changed: 28 ins; 14 del; 11 mod
  Patch: https://git.openjdk.org/jfx/pull/2091.diff
  Fetch: git fetch https://git.openjdk.org/jfx.git pull/2091/head:pull/2091

PR: https://git.openjdk.org/jfx/pull/2091

Reply via email to