-
Notifications
You must be signed in to change notification settings - Fork 617
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fieldmap length and checksum optimization (#42)
* Create NumbersCache.java A cache for strings of frequently used integers * Optimized message checksum and length calculation Avoided some temporary IntField creation to compute length. In fact, the "isStringEquivalent" branch that I added is useless with previous commit on Message class, which directly compute length & checksum if possible. Change some 'for each' list iteration by old loop over index to avoid iterator allocations, as the jvm will not always do it for us. * - minor renaming - changed NumbersCache to only hold numbers up to 99999 since it should be sufficient for normal use cases
- Loading branch information
1 parent
6229d07
commit 9921529
Showing
2 changed files
with
50 additions
and
23 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
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