=== Baseline JDK: /home/shade/trunks/jdk9-dev/build/linux-x86_64-normal-server-release/images/j2sdk-image/ openjdk version "1.9.0-internal" OpenJDK Runtime Environment (build 1.9.0-internal-shade_2014_11_28_00_48-b00) OpenJDK 64-Bit Server VM (build 1.9.0-internal-shade_2014_11_28_00_48-b00, mixed mode) Running 64-bit HotSpot VM. Using compressed references with 3-bit shift. Objects are 8 bytes aligned. Field sizes by type: 4, 1, 1, 2, 2, 4, 4, 8, 8 [bytes] Array element sizes: 4, 1, 1, 2, 2, 4, 4, 8, 8 [bytes] String footprint: X axis is String size, Y axis is compressibility (% of 1-byte characters in String) Values are sizes in bytes. Average footprint per character is in parentheses. | 0.00 0.50 1.00 ----------------------------------------------------------------------------------------------------- 1 | 48 ( 48.0) 48 ( 48.0) 48 ( 48.0) 4 | 48 ( 12.0) 48 ( 12.0) 48 ( 12.0) 16 | 72 ( 4.5) 72 ( 4.5) 72 ( 4.5) 64 | 168 ( 2.6) 168 ( 2.6) 168 ( 2.6) 256 | 552 ( 2.2) 552 ( 2.2) 552 ( 2.2) 1024 | 2088 ( 2.0) 2088 ( 2.0) 2088 ( 2.0) === Patched JDK: /home/shade/trunks/jdk9-dev-string-compress/build/linux-x86_64-normal-server-release/images/j2sdk-image/ openjdk version "1.9.0-internal" OpenJDK Runtime Environment (build 1.9.0-internal-shade_2014_11_20_00_09-b00) OpenJDK 64-Bit Server VM (build 1.9.0-internal-shade_2014_11_20_00_09-b00, mixed mode) Running 64-bit HotSpot VM. Using compressed references with 3-bit shift. Objects are 8 bytes aligned. Field sizes by type: 4, 1, 1, 2, 2, 4, 4, 8, 8 [bytes] Array element sizes: 4, 1, 1, 2, 2, 4, 4, 8, 8 [bytes] String footprint: X axis is String size, Y axis is compressibility (% of 1-byte characters in String) Values are sizes in bytes. Average footprint per character is in parentheses. | 0.00 0.50 1.00 ----------------------------------------------------------------------------------------------------- 1 | 48 ( 48.0) 48 ( 48.0) 48 ( 48.0) 4 | 48 ( 12.0) 48 ( 12.0) 48 ( 12.0) 16 | 72 ( 4.5) 72 ( 4.5) 56 ( 3.5) 64 | 168 ( 2.6) 168 ( 2.6) 104 ( 1.6) 256 | 552 ( 2.2) 552 ( 2.2) 296 ( 1.2) 1024 | 2088 ( 2.0) 2088 ( 2.0) 1064 ( 1.0) === Equals You can run this benchmark selectively with JMH by invoking: $ java -jar string-density-bench.jar -jmh Equals [-p size=...] [-p cmp=...] [-prof perfasm] [other JMH params] X axis is String size, Y axis is compressibility (% of 1-byte characters in String). Format is: (patched-nanoseconds vs. baseline-nanoseconds), percent-difference. Positive percents are statistically significant improvements, negative percents are statistically significant regressions. | 0.00 0.50 1.00 ----------------------------------------------------------------------------------------------------- 1 | (3.9 vs 3.9) (4.1 vs 4.7) (4.2 vs 4.0) 4 | (7.3 vs 5.0), -30.9% (7.1 vs 5.3), -26.0% (5.9 vs 5.5) 16 | (19.2 vs 4.9), -74.4% (19.1 vs 4.9), -74.5% (11.7 vs 4.6), -60.2% 64 | (65.6 vs 8.4), -87.2% (65.0 vs 7.7), -88.1% (41.7 vs 7.7), -81.5% 256 | (214.5 vs 15.9), -92.6% (214.8 vs 15.7), -92.7% (115.4 vs 15.7), -86.4% 1024 | (806.8 vs 53.6), -93.4% (809.3 vs 49.5), -93.9% (412.4 vs 49.9), -87.9% === HashCode You can run this benchmark selectively with JMH by invoking: $ java -jar string-density-bench.jar -jmh HashCode [-p size=...] [-p cmp=...] [-prof perfasm] [other JMH params] X axis is String size, Y axis is compressibility (% of 1-byte characters in String). Format is: (patched-nanoseconds vs. baseline-nanoseconds), percent-difference. Positive percents are statistically significant improvements, negative percents are statistically significant regressions. | 0.00 0.50 1.00 ----------------------------------------------------------------------------------------------------- 1 | (4.5 vs 3.9), -13.3% (4.6 vs 3.9), -14.3% (4.5 vs 4.1), -8.9% 4 | (8.0 vs 6.1), -24.3% (8.1 vs 5.6), -30.2% (6.3 vs 5.7), -10.4% 16 | (16.0 vs 11.7), -27.2% (16.0 vs 11.7), -27.0% (12.1 vs 12.0) 64 | (52.0 vs 47.3), -9.0% (58.8 vs 47.0), -20.1% (47.7 vs 47.4) 256 | (208.5 vs 193.9), -7.0% (195.9 vs 194.0), -0.9% (195.0 vs 194.0) 1024 | (784.6 vs 772.4), -1.6% (782.1 vs 773.2), -1.1% (777.0 vs 772.0), -0.6% === CompareTo You can run this benchmark selectively with JMH by invoking: $ java -jar string-density-bench.jar -jmh CompareTo [-p size=...] [-p cmp=...] [-prof perfasm] [other JMH params] X axis is String size, Y axis is compressibility (% of 1-byte characters in String). Format is: (patched-nanoseconds vs. baseline-nanoseconds), percent-difference. Positive percents are statistically significant improvements, negative percents are statistically significant regressions. | 0.00 0.50 1.00 ----------------------------------------------------------------------------------------------------- 1 | (4.7 vs 4.2), -11.0% (4.9 vs 4.2), -15.3% (4.5 vs 4.3), -5.6% 4 | (9.3 vs 6.4), -31.5% (9.0 vs 6.5), -27.7% (6.5 vs 6.5) 16 | (15.9 vs 7.8), -51.2% (15.9 vs 7.7), -51.2% (12.1 vs 7.8), -35.4% 64 | (43.5 vs 15.0), -65.6% (40.8 vs 15.2), -62.8% (24.4 vs 12.9), -47.3% 256 | (149.4 vs 21.8), -85.4% (149.5 vs 21.3), -85.7% (79.0 vs 23.6), -70.1% 1024 | (556.4 vs 58.5), -89.5% (555.6 vs 61.8), -88.9% (284.6 vs 61.8), -78.3% === FromCharArray You can run this benchmark selectively with JMH by invoking: $ java -jar string-density-bench.jar -jmh FromCharArray [-p size=...] [-p cmp=...] [-prof perfasm] [other JMH params] X axis is String size, Y axis is compressibility (% of 1-byte characters in String). Format is: (patched-nanoseconds vs. baseline-nanoseconds), percent-difference. Positive percents are statistically significant improvements, negative percents are statistically significant regressions. | 0.00 0.50 1.00 ----------------------------------------------------------------------------------------------------- 1 | (29.5 vs 15.9), -46.0% (29.5 vs 8.9), -69.9% (17.5 vs 8.1), -53.7% 4 | (33.6 vs 9.1), -73.0% (34.6 vs 9.0), -74.1% (18.5 vs 11.6), -37.1% 16 | (39.7 vs 8.9), -77.6% (39.6 vs 8.7), -78.1% (18.2 vs 8.6), -53.1% 64 | (69.9 vs 16.1), -76.9% (70.6 vs 16.1), -77.2% (21.0 vs 16.4), -22.0% 256 | (208.8 vs 57.7), -72.4% (211.8 vs 56.9), -73.1% (34.8 vs 57.1), +64.4% 1024 | (838.0 vs 215.8), -74.2% (791.8 vs 233.9), -70.5% (164.7 vs 214.0), +29.9% === ToCharArray You can run this benchmark selectively with JMH by invoking: $ java -jar string-density-bench.jar -jmh ToCharArray [-p size=...] [-p cmp=...] [-prof perfasm] [other JMH params] X axis is String size, Y axis is compressibility (% of 1-byte characters in String). Format is: (patched-nanoseconds vs. baseline-nanoseconds), percent-difference. Positive percents are statistically significant improvements, negative percents are statistically significant regressions. | 0.00 0.50 1.00 ----------------------------------------------------------------------------------------------------- 1 | (17.4 vs 6.8), -60.9% (17.4 vs 6.8), -61.1% (17.6 vs 6.8), -61.2% 4 | (20.6 vs 6.8), -66.8% (20.7 vs 6.8), -67.4% (17.5 vs 6.8), -61.4% 16 | (26.6 vs 7.0), -73.6% (26.4 vs 7.1), -73.2% (18.2 vs 7.3), -59.7% 64 | (61.3 vs 14.2), -76.8% (61.9 vs 13.8), -77.7% (21.8 vs 13.7), -37.1% 256 | (214.2 vs 52.1), -75.7% (214.6 vs 51.9), -75.8% (55.2 vs 51.6), -6.5% 1024 | (941.0 vs 209.1), -77.8% (952.3 vs 211.0), -77.8% (219.7 vs 210.0), -4.4% === IndexOfString You can run this benchmark selectively with JMH by invoking: $ java -jar string-density-bench.jar -jmh IndexOfString [-p size=...] [-p cmp=...] [-prof perfasm] [other JMH params] X axis is String size, Y axis is compressibility (% of 1-byte characters in String). Format is: (patched-nanoseconds vs. baseline-nanoseconds), percent-difference. Positive percents are statistically significant improvements, negative percents are statistically significant regressions. | 0.00 0.50 1.00 ----------------------------------------------------------------------------------------------------- 1 | (7.1 vs 7.3), +2.9% (7.2 vs 7.2) (4.5 vs 7.3), +60.4% 4 | (12.9 vs 7.3), -43.4% (12.7 vs 7.3), -42.8% (8.0 vs 7.3), -9.2% 16 | (25.5 vs 8.5), -66.7% (21.7 vs 8.4), -61.1% (13.7 vs 8.5), -38.3% 64 | (55.1 vs 21.4), -61.1% (59.3 vs 21.4), -63.9% (35.1 vs 21.8), -38.0% 256 | (232.9 vs 75.7), -67.5% (235.1 vs 76.2), -67.6% (109.6 vs 75.6), -31.0% 1024 | (853.0 vs 297.7), -65.1% (856.6 vs 298.3), -65.2% (399.5 vs 300.0), -24.9% === CharAt You can run this benchmark selectively with JMH by invoking: $ java -jar string-density-bench.jar -jmh CharAt [-p size=...] [-p cmp=...] [-prof perfasm] [other JMH params] X axis is String size, Y axis is compressibility (% of 1-byte characters in String). Format is: (patched-nanoseconds vs. baseline-nanoseconds), percent-difference. Positive percents are statistically significant improvements, negative percents are statistically significant regressions. | 0.00 0.50 1.00 ----------------------------------------------------------------------------------------------------- 1 | (4.3 vs 4.0), -7.7% (4.4 vs 4.0), -7.2% (4.1 vs 4.0), -2.5% 4 | (7.3 vs 6.0), -17.6% (7.8 vs 6.0), -22.5% (6.4 vs 6.0), -6.7% 16 | (13.1 vs 9.3), -28.9% (13.1 vs 9.1), -30.4% (9.5 vs 9.2), -3.2% 64 | (34.2 vs 18.4), -46.3% (34.4 vs 18.3), -46.7% (19.1 vs 18.3), -4.0% 256 | (113.2 vs 73.7), -34.9% (114.3 vs 73.7), -35.5% (73.5 vs 73.6) 1024 | (438.2 vs 270.1), -38.4% (436.4 vs 270.6), -38.0% (271.2 vs 270.3)