-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The previous remapper implementation contained some branches in which the returned values weren't cached. Most importantly, when a name wasn't mapped, the `null` value returned in that case is persisted as `null` in the map and thus wasn't distinguishable from a cache miss with `get()`. This is worked around by using `computeIfAbsent`. Improves the JUnit benchmark's runtime by ~2%. The impact is larger when a larger fraction of identifiers isn't mapped by rules.
- Loading branch information
Showing
1 changed file
with
47 additions
and
56 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters