-
Notifications
You must be signed in to change notification settings - Fork 371
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The `JavaTypeCache` now internally uses the `AdaptiveRadixTree` instead of a `HashMap` with Snappy-compressed keys. Overall this results in a lower memory footprint: ``` Retained AdaptiveRadixTree size: 7316248 bytes Retained Snappy size: 8575104 bytes Retained HashMap size: 9105560 bytes ``` Here are the JMH benchmark measurements showing an overall increase in performance (the tests with the `AddOpens` suffix started the JVM using `--add-opens java.base/java.lang=ALL-UNNAMED` to skip some `byte[]` allocations for increased performance): ``` Benchmark Mode Cnt Score Error Units JavaTypeCacheBenchmark.readAdaptiveRadix thrpt 2 794.740 ops/s JavaTypeCacheBenchmark.readAdaptiveRadix:gc.alloc.rate thrpt 2 2239.494 MB/sec JavaTypeCacheBenchmark.readAdaptiveRadix:gc.alloc.rate.norm thrpt 2 2956386.085 B/op JavaTypeCacheBenchmark.readAdaptiveRadix:gc.count thrpt 2 104.000 counts JavaTypeCacheBenchmark.readAdaptiveRadix:gc.time thrpt 2 37.000 ms JavaTypeCacheBenchmark.readAdaptiveRadixAddOpens thrpt 2 886.947 ops/s JavaTypeCacheBenchmark.readAdaptiveRadixAddOpens:gc.alloc.rate thrpt 2 0.002 MB/sec JavaTypeCacheBenchmark.readAdaptiveRadixAddOpens:gc.alloc.rate.norm thrpt 2 1.842 B/op JavaTypeCacheBenchmark.readAdaptiveRadixAddOpens:gc.count thrpt 2 ≈ 0 counts JavaTypeCacheBenchmark.readSnappy thrpt 2 344.614 ops/s JavaTypeCacheBenchmark.readSnappy:gc.alloc.rate thrpt 2 3134.230 MB/sec JavaTypeCacheBenchmark.readSnappy:gc.alloc.rate.norm thrpt 2 9544228.824 B/op JavaTypeCacheBenchmark.readSnappy:gc.count thrpt 2 144.000 counts JavaTypeCacheBenchmark.readSnappy:gc.time thrpt 2 61.000 ms JavaTypeCacheBenchmark.writeAdaptiveRadix thrpt 2 650.472 ops/s JavaTypeCacheBenchmark.writeAdaptiveRadix:gc.alloc.rate thrpt 2 4941.345 MB/sec JavaTypeCacheBenchmark.writeAdaptiveRadix:gc.alloc.rate.norm thrpt 2 7969122.563 B/op JavaTypeCacheBenchmark.writeAdaptiveRadix:gc.count thrpt 2 112.000 counts JavaTypeCacheBenchmark.writeAdaptiveRadix:gc.time thrpt 2 101.000 ms JavaTypeCacheBenchmark.writeAdaptiveRadixAddOpens thrpt 2 754.388 ops/s JavaTypeCacheBenchmark.writeAdaptiveRadixAddOpens:gc.alloc.rate thrpt 2 3604.748 MB/sec JavaTypeCacheBenchmark.writeAdaptiveRadixAddOpens:gc.alloc.rate.norm thrpt 2 5012698.210 B/op JavaTypeCacheBenchmark.writeAdaptiveRadixAddOpens:gc.count thrpt 2 100.000 counts JavaTypeCacheBenchmark.writeAdaptiveRadixAddOpens:gc.time thrpt 2 81.000 ms JavaTypeCacheBenchmark.writeSnappy thrpt 2 324.280 ops/s JavaTypeCacheBenchmark.writeSnappy:gc.alloc.rate thrpt 2 3355.699 MB/sec JavaTypeCacheBenchmark.writeSnappy:gc.alloc.rate.norm thrpt 2 10859397.103 B/op JavaTypeCacheBenchmark.writeSnappy:gc.count thrpt 2 77.000 counts JavaTypeCacheBenchmark.writeSnappy:gc.time thrpt 2 102.000 ms ```
- Loading branch information
1 parent
9e9594d
commit 777d6e1
Showing
8 changed files
with
185 additions
and
176 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
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
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
Oops, something went wrong.