Skip to content

Latest commit

 

History

History
620 lines (580 loc) · 54.4 KB

benchmark_2.0.51.md

File metadata and controls

620 lines (580 loc) · 54.4 KB

这个场景是JSONB格式和Fury CompatibleMode反序列化性能比较。基于KeyValue的映射,对增加和删除字段的序列化结构都能有很好的兼容性。

aliyun ecs spec jdk version jsonb fury
aliyun_ecs.c8i.large jdk1.8.0_381 6522.782 3981.378 (61.04%)
jdk-11.0.20 6306.407 4055.482 (64.31%)
jdk-17.0.8 7050.191 4226.573 (59.95%)
jdk-21.0.2 7276.227 4416.792 (60.7%)
graalvm_21+35.1 9112.022 4979.564 (54.65%)
aliyun_ecs.g8y.large jdk1.8.0_381 8066.464 6176.948 (76.58%)
jdk-11.0.20 3018.682 7485.011 (247.96%)
jdk-17.0.8 9694.325 7638.356 (78.79%)
jdk-21.0.2 9609.182 7812.459 (81.3%)
graalvm_21+35.1 11315.349 8897.31 (78.63%)
orangepi5p jdk1.8.0_381 4832.59 5016.37 (103.8%)
jdk-11.0.20 3342.472 2895.441 (86.63%)
jdk-17.0.8 3485.201 3067.836 (88.02%)
jdk-21.0.2 3455.967 3079.555 (89.11%)
graalvm_21+35.1 4228.106 3575.322 (84.56%)
orangepi_aipro jdk1.8.0_381 1410.261 1372.304 (97.31%)
jdk-11.0.20 1411.354 1318.522 (93.42%)
jdk-17.0.8 2056.795 1588.407 (77.23%)
jdk-21.0.2 1992.319 1561.347 (78.37%)
graalvm_21+35.1 2019.068 1763.881 (87.36%)
MacBookM1Pro zulu-8.jdk 24426.058 14159.114 (57.97%)
zulu-11.jdk 19446.519 13894.805 (71.45%)
zulu-17.jdk 28684.924 24840.199 (86.6%)
zulu-21.jdk 29115.553 24062.326 (82.64%)
graalvm_21+35.1 34661.513 17785.073 (51.31%)

这个场景是JSONB格式和Fury CompatibleMode序列化性能比较。基于KeyValue的映射,对增加和删除字段的序列化结构都能有很好的兼容性。

aliyun ecs spec jdk version jsonb fury
aliyun_ecs.c8i.large jdk1.8.0_381 5348.298 3870.918 (72.38%)
jdk-11.0.20 5245.307 3927.065 (74.87%)
jdk-17.0.8 5862.842 4704.801 (80.25%)
jdk-21.0.2 6280.186 4322.933 (68.83%)
graalvm_21+35.1 7208.209 4567.438 (63.36%)
aliyun_ecs.g8y.large jdk1.8.0_381 7813.296 4967.121 (63.57%)
jdk-11.0.20 8703.827 5917.593 (67.99%)
jdk-17.0.8 8610.319 7319.76 (85.01%)
jdk-21.0.2 9451.52 6293.706 (66.59%)
graalvm_21+35.1 10989.063 6143.076 (55.9%)
orangepi5p jdk1.8.0_381 4596.933 3780.705 (82.24%)
jdk-11.0.20 3537.139 2826.012 (79.9%)
jdk-17.0.8 3633.13 3705.521 (101.99%)
jdk-21.0.2 3626.263 3317.665 (91.49%)
graalvm_21+35.1 4518.393 3397.175 (75.19%)
orangepi_aipro jdk1.8.0_381 1561.54 1366.72 (87.52%)
jdk-11.0.20 1863.445 1415.942 (75.99%)
jdk-17.0.8 1890.249 1163.985 (61.58%)
jdk-21.0.2 1959.123 1340.615 (68.43%)
graalvm_21+35.1 1825.428 1485.397 (81.37%)
MacBookM1Pro zulu-8.jdk 25097.131 22432.706 (89.38%)
zulu-11.jdk 18791.518 10032.559 (53.39%)
zulu-17.jdk 29937.779 15789.054 (52.74%)
zulu-21.jdk 33020.057 16225.744 (49.14%)
graalvm_21+35.1 32900.804 15065.286 (45.79%)

这个场景是二进制反序列化比较,JSONB格式、JSON UTF8编码(fastjson2UTF8Bytes)、hessian、javaSerialize的比较,用于Apache dubbo的用户选择二进制协议比较

aliyun ecs spec jdk version jsonb fastjson2UTF8Bytes hessian javaSerialize
aliyun_ecs.c8i.large jdk1.8.0_381 7783.479 3424.983 (44%) 660.564 (8.49%) 114.67 (1.47%)
jdk-11.0.20 7706.522 3480.223 (45.16%) 630.829 (8.19%) 113.253 (1.47%)
jdk-17.0.8 8938.953 3834.742 (42.9%) 647.244 (7.24%) 127.284 (1.42%)
jdk-21.0.2 9044.582 3832.477 (42.37%) 682.849 (7.55%) 126.195 (1.4%)
graalvm_21+35.1 10331.604 4256.368 (41.2%) 792.495 (7.67%) 127.997 (1.24%)
aliyun_ecs.g8y.large jdk1.8.0_381 9293.527 5545.317 (59.67%) 369.086 (3.97%) 174.14 (1.87%)
jdk-11.0.20 9930.861 5662.664 (57.02%) 386.42 (3.89%) 170.059 (1.71%)
jdk-17.0.8 10398.971 5817.811 (55.95%) 420.178 (4.04%) 170.428 (1.64%)
jdk-21.0.2 10369.575 5670.758 (54.69%) 540.938 (5.22%) 179.029 (1.73%)
graalvm_21+35.1 12677.323 6493.67 (51.22%) 693.684 (5.47%) 182.163 (1.44%)
orangepi5p jdk1.8.0_381 3871.197 2734.779 (70.64%) 179.427 (4.63%) 96.904 (2.5%)
jdk-11.0.20 3656.225 2199.793 (60.17%) 179.034 (4.9%) 84.463 (2.31%)
jdk-17.0.8 3635.901 2316.576 (63.71%) 185.252 (5.1%) 88.576 (2.44%)
jdk-21.0.2 3567.276 2268.786 (63.6%) 166.43 (4.67%) 86.584 (2.43%)
graalvm_21+35.1 4747.617 2827.921 (59.57%) 216.862 (4.57%) 84.365 (1.78%)
orangepi_aipro jdk1.8.0_381 1714.172 1067.708 (62.29%) 133.372 (7.78%) 30.913 (1.8%)
jdk-11.0.20 2001.869 1079.042 (53.9%) 141.723 (7.08%) 28.167 (1.41%)
jdk-17.0.8 2354.94 1212.958 (51.51%) 153.674 (6.53%) 28.52 (1.21%)
jdk-21.0.2 2274.706 1216.295 (53.47%) 127.031 (5.58%) 27.515 (1.21%)
graalvm_21+35.1 2563.99 1274.469 (49.71%) 215.941 (8.42%) 26.193 (1.02%)
MacBookM1Pro zulu-8.jdk 36720.347 16457.101 (44.82%) 795.778 (2.17%) 444.057 (1.21%)
zulu-11.jdk 24851.692 12912.727 (51.96%) 601.677 (2.42%) 333.647 (1.34%)
zulu-17.jdk 43834.079 17970.869 (41%) 763.288 (1.74%) 538.156 (1.23%)
zulu-21.jdk 42380.001 17388.74 (41.03%) 778.133 (1.84%) 525.603 (1.24%)
graalvm_21+35.1 52364.224 22733.707 (43.41%) 1077.366 (2.06%) 517.319 (0.99%)

这个场景是二进制反序列化比较,JSONB格式(基于字段顺序映射)、kryo、protobuf的比较

aliyun ecs spec jdk version jsonb kryo protobuf
aliyun_ecs.c8i.large jdk1.8.0_381 10686.741 3582.027 (33.52%) 2923.132 (27.35%)
jdk-11.0.20 10414.028 3210.541 (30.83%) 2854.064 (27.41%)
jdk-17.0.8 13065.007 2968.321 (22.72%) 3759.322 (28.77%)
jdk-21.0.2 13013.246 3729.114 (28.66%) 3842.272 (29.53%)
graalvm_21+35.1 16544.088 3998.275 (24.17%) 5633.047 (34.05%)
aliyun_ecs.g8y.large jdk1.8.0_381 11923.289 5795.011 (48.6%) 4013.604 (33.66%)
jdk-11.0.20 11344.654 5864.49 (51.69%) 3967.717 (34.97%)
jdk-17.0.8 12802.867 5994.061 (46.82%) 4920.37 (38.43%)
jdk-21.0.2 13182.282 5763.734 (43.72%) 5424.138 (41.15%)
graalvm_21+35.1 20518.491 5306.472 (25.86%) 7690.81 (37.48%)
orangepi5p jdk1.8.0_381 4245.849 2050.891 (48.3%) 1495.019 (35.21%)
jdk-11.0.20 4251.991 1919.172 (45.14%) 1734.784 (40.8%)
jdk-17.0.8 4010.471 2179.309 (54.34%) 1947.221 (48.55%)
jdk-21.0.2 4324.392 2158.999 (49.93%) 1951.388 (45.13%)
graalvm_21+35.1 5351.05 1987.599 (37.14%) 2750.837 (51.41%)
orangepi_aipro jdk1.8.0_381 2090.466 1091.673 (52.22%) 562.316 (26.9%)
jdk-11.0.20 2560.269 944.996 (36.91%) 679.887 (26.56%)
jdk-17.0.8 2846.698 1159.936 (40.75%) 820.089 (28.81%)
jdk-21.0.2 2858.965 1117.204 (39.08%) 1144.283 (40.02%)
graalvm_21+35.1 3637.324 991.776 (27.27%) 1252.537 (34.44%)
MacBookM1Pro zulu-8.jdk 47677.683 9772.461 (20.5%) 13319.697 (27.94%)
zulu-11.jdk 35442.654 11710.025 (33.04%) 8161.418 (23.03%)
zulu-17.jdk 55789.537 15286.747 (27.4%) 17265.173 (30.95%)
zulu-21.jdk 55703.929 11799.151 (21.18%) 19136.1 (34.35%)
graalvm_21+35.1 82668.309 14154.181 (17.12%) 32596.886 (39.43%)

这个场景是带类型信息二进制反序列化比较,JSONB格式、JSON UTF8编码(fastjson2UTF8Bytes)、hessian、javaSerialize的比较,用于Apache dubbo的用户选择二进制协议比较

aliyun ecs spec jdk version fastjson2JSONB hessian javaSerialize
aliyun_ecs.c8i.large jdk1.8.0_381 4348.4 678.41 (15.6%) 116.407 (2.68%)
jdk-11.0.20 3159.395 626.374 (19.83%) 115.09 (3.64%)
jdk-17.0.8 4816.106 642.065 (13.33%) 128.635 (2.67%)
jdk-21.0.2 4654.375 686.064 (14.74%) 125.165 (2.69%)
graalvm_21+35.1 5487.989 778.452 (14.18%) 127.039 (2.31%)
aliyun_ecs.g8y.large jdk1.8.0_381 5795.288 391.329 (6.75%) 172.321 (2.97%)
jdk-11.0.20 6101.904 409.076 (6.7%) 169.359 (2.78%)
jdk-17.0.8 6386.129 431.383 (6.75%) 168.756 (2.64%)
jdk-21.0.2 6248.781 540.206 (8.64%) 177.2 (2.84%)
graalvm_21+35.1 7602.284 706.806 (9.3%) 176.782 (2.33%)
orangepi5p jdk1.8.0_381 1995.475 175.521 (8.8%) 87.998 (4.41%)
jdk-11.0.20 2095.273 178.295 (8.51%) 81.884 (3.91%)
jdk-17.0.8 2162.237 184.154 (8.52%) 87.638 (4.05%)
jdk-21.0.2 2172.289 168.411 (7.75%) 86.359 (3.98%)
graalvm_21+35.1 2866.525 219.019 (7.64%) 83.698 (2.92%)
orangepi_aipro jdk1.8.0_381 1011.65 144.132 (14.25%) 30.528 (3.02%)
jdk-11.0.20 1139.341 143.872 (12.63%) 27.991 (2.46%)
jdk-17.0.8 1313.363 152.276 (11.59%) 28.46 (2.17%)
jdk-21.0.2 1240.96 136.943 (11.04%) 28.114 (2.27%)
graalvm_21+35.1 1497.713 211.314 (14.11%) 26.582 (1.77%)
MacBookM1Pro zulu-8.jdk 20300.314 789.508 (3.89%) 439.642 (2.17%)
zulu-11.jdk 4783.313 597.298 (12.49%) 316.077 (6.61%)
zulu-17.jdk 24276.72 685.806 (2.82%) 549.599 (2.26%)
zulu-21.jdk 22963.723 776.018 (3.38%) 527.331 (2.3%)
graalvm_21+35.1 27629.523 1072.302 (3.88%) 520.086 (1.88%)

这个场景是将没有格式化的JSON字符串反序列化为JavaBean对象,是最常用的场景,这个是fastjson1的强项。

aliyun ecs spec jdk version fastjson2 fastjson1 jackson gson
aliyun_ecs.c8i.large jdk1.8.0_381 3070.037 2157.914 (70.29%) 1064.967 (34.69%) 1006.316 (32.78%)
jdk-11.0.20 3457.632 1961.097 (56.72%) 998.756 (28.89%) 954.546 (27.61%)
jdk-17.0.8 3803.859 2620.696 (68.9%) 1006.078 (26.45%) 975.114 (25.63%)
jdk-21.0.2 3909.863 2598.68 (66.46%) 989.862 (25.32%) 911.289 (23.31%)
graalvm_21+35.1 3795.558 3874.014 (102.07%) 1068.44 (28.15%) 1046.591 (27.57%)
aliyun_ecs.g8y.large jdk1.8.0_381 5373.909 3395.799 (63.19%) 1517.479 (28.24%) 1581.345 (29.43%)
jdk-11.0.20 5790.742 3328.359 (57.48%) 1474.959 (25.47%) 1498.823 (25.88%)
jdk-17.0.8 5898.3 4553.929 (77.21%) 1529.272 (25.93%) 1539.459 (26.1%)
jdk-21.0.2 5725.014 4559.234 (79.64%) 1435.782 (25.08%) 1390.254 (24.28%)
graalvm_21+35.1 6232.078 5306.492 (85.15%) 1496.142 (24.01%) 1381.239 (22.16%)
orangepi5p jdk1.8.0_381 2285.435 1689.493 (73.92%) 723.341 (31.65%) 567.799 (24.84%)
jdk-11.0.20 2319.694 1535.976 (66.21%) 665.266 (28.68%) 613.18 (26.43%)
jdk-17.0.8 2324.891 2038.585 (87.69%) 688.016 (29.59%) 589.395 (25.35%)
jdk-21.0.2 2355.201 1927.142 (81.82%) 652.754 (27.72%) 519.897 (22.07%)
graalvm_21+35.1 2572.267 2294.257 (89.19%) 675.776 (26.27%) 540.415 (21.01%)
orangepi_aipro jdk1.8.0_381 1120.717 652.053 (58.18%) 292.695 (26.12%) 251.077 (22.4%)
jdk-11.0.20 1102.951 675.158 (61.21%) 295.196 (26.76%) 260.51 (23.62%)
jdk-17.0.8 1230.891 977.221 (79.39%) 318.526 (25.88%) 262.293 (21.31%)
jdk-21.0.2 1183.179 961.926 (81.3%) 289.396 (24.46%) 223.486 (18.89%)
graalvm_21+35.1 1269.383 955.158 (75.25%) 280.37 (22.09%) 245.594 (19.35%)
MacBookM1Pro zulu-8.jdk 19402.716 11556.222 (59.56%) 4756.504 (24.51%) 5427.668 (27.97%)
zulu-11.jdk 12807.69 7195.474 (56.18%) 3495.97 (27.3%) 3888.37 (30.36%)
zulu-17.jdk 19909.378 16387.353 (82.31%) 4853.883 (24.38%) 5818.946 (29.23%)
zulu-21.jdk 18304.187 14847.919 (81.12%) 4806.481 (26.26%) 5248.902 (28.68%)
graalvm_21+35.1 22939.935 15300.833 (66.7%) 4666.729 (20.34%) 4926.036 (21.47%)

这个场景是将格式化过的JSON字符串反序列化为JavaBean对象

aliyun ecs spec jdk version fastjson2 fastjson1 jackson gson
aliyun_ecs.c8i.large jdk1.8.0_381 2177.198 596.375 (27.39%) 950.494 (43.66%) 914.146 (41.99%)
jdk-11.0.20 2327.934 585.352 (25.14%) 918.466 (39.45%) 894.408 (38.42%)
jdk-17.0.8 2539.783 629.772 (24.8%) 891.752 (35.11%) 903.595 (35.58%)
jdk-21.0.2 2669.672 629.442 (23.58%) 894.804 (33.52%) 866.673 (32.46%)
graalvm_21+35.1 2388.538 886.921 (37.13%) 938.237 (39.28%) 964.788 (40.39%)
aliyun_ecs.g8y.large jdk1.8.0_381 4180.57 992.527 (23.74%) 1439.976 (34.44%) 1423.948 (34.06%)
jdk-11.0.20 2153.663 1011.08 (46.95%) 1361.044 (63.2%) 1393.463 (64.7%)
jdk-17.0.8 4292.907 1125.867 (26.23%) 1371.339 (31.94%) 1465.836 (34.15%)
jdk-21.0.2 2322.71 1031.307 (44.4%) 1334.497 (57.45%) 1302.732 (56.09%)
graalvm_21+35.1 4377.145 1389.525 (31.75%) 1321.087 (30.18%) 1338.336 (30.58%)
orangepi5p jdk1.8.0_381 1781.161 438.791 (24.64%) 652.642 (36.64%) 529.35 (29.72%)
jdk-11.0.20 1017.808 441.898 (43.42%) 648.867 (63.75%) 578.502 (56.84%)
jdk-17.0.8 1819.058 497.081 (27.33%) 654.737 (35.99%) 565.472 (31.09%)
jdk-21.0.2 1871.711 449.573 (24.02%) 654.353 (34.96%) 511.646 (27.34%)
graalvm_21+35.1 1978.191 610.241 (30.85%) 580.109 (29.33%) 530.728 (26.83%)
orangepi_aipro jdk1.8.0_381 626.64 164.745 (26.29%) 263.387 (42.03%) 231.518 (36.95%)
jdk-11.0.20 835.947 183.306 (21.93%) 267.549 (32.01%) 229.573 (27.46%)
jdk-17.0.8 911.355 210.687 (23.12%) 288.165 (31.62%) 246.526 (27.05%)
jdk-21.0.2 925.024 178.321 (19.28%) 266.382 (28.8%) 212.764 (23%)
graalvm_21+35.1 909.829 230.511 (25.34%) 249.287 (27.4%) 211.057 (23.2%)
MacBookM1Pro zulu-8.jdk 13443.736 2883.389 (21.45%) 4623.649 (34.39%) 4800.251 (35.71%)
zulu-11.jdk 9661.076 1949.977 (20.18%) 3047.7 (31.55%) 3451.894 (35.73%)
zulu-17.jdk 15631.643 2999.769 (19.19%) 4456.299 (28.51%) 5218.646 (33.39%)
zulu-21.jdk 15667.415 3549.655 (22.66%) 4562.932 (29.12%) 4954.245 (31.62%)
graalvm_21+35.1 2712.152 4919.868 (181.4%) 4739.566 (174.75%) 4341.72 (160.08%)

这个场景是将没有格式化的JSON字符串解析为JSONObject或者HashMap,不涉及绑定JavaBean对象。

aliyun ecs spec jdk version fastjson2 fastjson1 jackson gson
aliyun_ecs.c8i.large jdk1.8.0_381 1941.173 1086.172 (55.95%) 1130.676 (58.25%) 856.825 (44.14%)
jdk-11.0.20 1883.781 1005.822 (53.39%) 945.368 (50.18%) 766.861 (40.71%)
jdk-17.0.8 2270.079 1220.187 (53.75%) 1087.301 (47.9%) 795.53 (35.04%)
jdk-21.0.2 2420.782 1163.65 (48.07%) 1096.266 (45.29%) 778.331 (32.15%)
graalvm_21+35.1 2199.747 1483.149 (67.42%) 1223.813 (55.63%) 940.277 (42.74%)
aliyun_ecs.g8y.large jdk1.8.0_381 2803.954 1267.481 (45.2%) 1331.103 (47.47%) 1280.729 (45.68%)
jdk-11.0.20 3148.682 1559.72 (49.54%) 1339.67 (42.55%) 1189.019 (37.76%)
jdk-17.0.8 3184.647 1645.133 (51.66%) 1535.995 (48.23%) 1262.241 (39.64%)
jdk-21.0.2 3110.429 1503.262 (48.33%) 1319.545 (42.42%) 1172.432 (37.69%)
graalvm_21+35.1 3285.393 2255.411 (68.65%) 1706.656 (51.95%) 1402.005 (42.67%)
orangepi5p jdk1.8.0_381 1119.685 619.084 (55.29%) 609.745 (54.46%) 470.919 (42.06%)
jdk-11.0.20 1167.382 640.698 (54.88%) 587.953 (50.37%) 471.244 (40.37%)
jdk-17.0.8 1211.875 720.581 (59.46%) 642.135 (52.99%) 474.025 (39.12%)
jdk-21.0.2 1168.437 686.767 (58.78%) 656.689 (56.2%) 463.939 (39.71%)
graalvm_21+35.1 1200.376 897.842 (74.8%) 679.107 (56.57%) 524.853 (43.72%)
orangepi_aipro jdk1.8.0_381 539.806 235.814 (43.68%) 251.657 (46.62%) 203.537 (37.71%)
jdk-11.0.20 652.691 290.72 (44.54%) 294.216 (45.08%) 203.454 (31.17%)
jdk-17.0.8 679.605 340.361 (50.08%) 310.544 (45.69%) 209.543 (30.83%)
jdk-21.0.2 647.512 279.501 (43.17%) 322.962 (49.88%) 199.479 (30.81%)
graalvm_21+35.1 641.296 433.414 (67.58%) 356.943 (55.66%) 229.051 (35.72%)
MacBookM1Pro zulu-8.jdk 11340.456 5041.129 (44.45%) 4490.823 (39.6%) 3943.935 (34.78%)
zulu-11.jdk 6158.824 3315.228 (53.83%) 3142.298 (51.02%) 3317.367 (53.86%)
zulu-17.jdk 12217.948 6212.644 (50.85%) 4707.615 (38.53%) 4281.938 (35.05%)
zulu-21.jdk 11976.32 5400.354 (45.09%) 4507.024 (37.63%) 4149.961 (34.65%)
graalvm_21+35.1 11946.418 8565.725 (71.7%) 5105.122 (42.73%) 4502.164 (37.69%)

这个场景是将格式化过的字符串解析为JSONObject或者HashMap,不涉及绑定JavaBean对象。

aliyun ecs spec jdk version fastjson2 fastjson1 jackson gson
aliyun_ecs.c8i.large jdk1.8.0_381 1469.355 967.462 (65.84%) 1013.913 (69%) 807.328 (54.94%)
jdk-11.0.20 1622.647 902.61 (55.63%) 936.029 (57.69%) 731.606 (45.09%)
jdk-17.0.8 1682.724 1050.239 (62.41%) 979.174 (58.19%) 729.945 (43.38%)
jdk-21.0.2 1804.686 1020.179 (56.53%) 1011.026 (56.02%) 733.585 (40.65%)
graalvm_21+35.1 1655.278 1287.346 (77.77%) 1048.72 (63.36%) 882.657 (53.32%)
aliyun_ecs.g8y.large jdk1.8.0_381 2476.21 1210.797 (48.9%) 1220.063 (49.27%) 1169.496 (47.23%)
jdk-11.0.20 2712.475 1347.405 (49.67%) 1251.539 (46.14%) 1130.42 (41.67%)
jdk-17.0.8 2722.027 1465.955 (53.86%) 1419.559 (52.15%) 1167.201 (42.88%)
jdk-21.0.2 2600.382 1323.623 (50.9%) 1248.835 (48.03%) 1095.785 (42.14%)
graalvm_21+35.1 2832.832 1912.584 (67.51%) 1585.274 (55.96%) 1324.381 (46.75%)
orangepi5p jdk1.8.0_381 1001.668 548.065 (54.72%) 591.549 (59.06%) 444.583 (44.38%)
jdk-11.0.20 1016.401 537.168 (52.85%) 586.661 (57.72%) 445.618 (43.84%)
jdk-17.0.8 1022.947 662.474 (64.76%) 599.74 (58.63%) 444.254 (43.43%)
jdk-21.0.2 1015.068 579.899 (57.13%) 582.08 (57.34%) 436.302 (42.98%)
graalvm_21+35.1 1064.702 750.402 (70.48%) 609.983 (57.29%) 500.956 (47.05%)
orangepi_aipro jdk1.8.0_381 492.2 245.959 (49.97%) 239.595 (48.68%) 186.753 (37.94%)
jdk-11.0.20 525.612 224.962 (42.8%) 268.6 (51.1%) 199.955 (38.04%)
jdk-17.0.8 569.233 302.494 (53.14%) 278.153 (48.86%) 195.313 (34.31%)
jdk-21.0.2 561.76 248.43 (44.22%) 293.563 (52.26%) 192.224 (34.22%)
graalvm_21+35.1 551.569 363.414 (65.89%) 308.588 (55.95%) 230.001 (41.7%)
MacBookM1Pro zulu-8.jdk 9702.966 4409.907 (45.45%) 4466.13 (46.03%) 3499.629 (36.07%)
zulu-11.jdk 5870.269 3083.266 (52.52%) 3103.646 (52.87%) 3050.247 (51.96%)
zulu-17.jdk 10137.527 5314.081 (52.42%) 4432.663 (43.73%) 4027.836 (39.73%)
zulu-21.jdk 10054.994 4489.681 (44.65%) 4443.669 (44.19%) 3884.524 (38.63%)
graalvm_21+35.1 10123.121 7120.004 (70.33%) 4882.055 (48.23%) 4498.17 (44.43%)

这个场景是将没有格式化的JSON字符串UTF8编码的byte[]数组反序列化解析为JSONObject或者HashMap,不涉及绑定JavaBean对象。

aliyun ecs spec jdk version fastjson2 fastjson1 jackson gson
aliyun_ecs.c8i.large jdk1.8.0_381 2138.868 1044.219 (48.82%) 1236.221 (57.8%) 760.302 (35.55%)
jdk-11.0.20 1886.202 916.544 (48.59%) 1031.048 (54.66%) 767.557 (40.69%)
jdk-17.0.8 2359.401 1100.922 (46.66%) 1183.094 (50.14%) 761.681 (32.28%)
jdk-21.0.2 2415.549 1048.399 (43.4%) 1194.584 (49.45%) 762.909 (31.58%)
graalvm_21+35.1 1973.267 1317.661 (66.78%) 1244.17 (63.05%) 942.224 (47.75%)
aliyun_ecs.g8y.large jdk1.8.0_381 2865.514 1207.237 (42.13%) 1386.884 (48.4%) 1116.729 (38.97%)
jdk-11.0.20 3237.695 1364.433 (42.14%) 1538.804 (47.53%) 1142.547 (35.29%)
jdk-17.0.8 3217.666 1462.774 (45.46%) 1733.802 (53.88%) 1174.602 (36.5%)
jdk-21.0.2 3101.075 1364.462 (44%) 1452.613 (46.84%) 1141.888 (36.82%)
graalvm_21+35.1 3346.717 1854.225 (55.4%) 1737.356 (51.91%) 1429.146 (42.7%)
orangepi5p jdk1.8.0_381 1063.979 554.65 (52.13%) 643.339 (60.47%) 442.817 (41.62%)
jdk-11.0.20 1149.608 571.33 (49.7%) 673.932 (58.62%) 439.057 (38.19%)
jdk-17.0.8 1172.144 653.573 (55.76%) 716.214 (61.1%) 455.853 (38.89%)
jdk-21.0.2 1134.096 582.92 (51.4%) 646.195 (56.98%) 440.833 (38.87%)
graalvm_21+35.1 1162.711 696.301 (59.89%) 693.287 (59.63%) 491.746 (42.29%)
orangepi_aipro jdk1.8.0_381 535.761 224.349 (41.87%) 296.115 (55.27%) 181.603 (33.9%)
jdk-11.0.20 608.725 262.568 (43.13%) 336.499 (55.28%) 192.413 (31.61%)
jdk-17.0.8 687.488 300.052 (43.64%) 379.672 (55.23%) 206.361 (30.02%)
jdk-21.0.2 654.622 256.151 (39.13%) 390.439 (59.64%) 202.777 (30.98%)
graalvm_21+35.1 652.038 337.703 (51.79%) 346.289 (53.11%) 195.302 (29.95%)
MacBookM1Pro zulu-8.jdk 11345.787 4649.725 (40.98%) 4434.67 (39.09%) 4381.773 (38.62%)
zulu-11.jdk 6867.435 3054.144 (44.47%) 3425.757 (49.88%) 3499.669 (50.96%)
zulu-17.jdk 12853.897 5502.421 (42.81%) 5417.567 (42.15%) 4277.388 (33.28%)
zulu-21.jdk 12235.655 4742.562 (38.76%) 5314.728 (43.44%) 4149.281 (33.91%)
graalvm_21+35.1 12015.887 6343.23 (52.79%) 4923.79 (40.98%) 4533.399 (37.73%)

这个场景是将格式化过的字符串UTF8编码的byte[]数组反序列化解析为JSONObject或者HashMap,不涉及绑定JavaBean对象。

aliyun ecs spec jdk version fastjson2 fastjson1 jackson gson
aliyun_ecs.c8i.large jdk1.8.0_381 1488.736 875.201 (58.79%) 1120.047 (75.23%) 695.644 (46.73%)
jdk-11.0.20 1410.776 802.089 (56.85%) 971.939 (68.89%) 724.259 (51.34%)
jdk-17.0.8 1737.556 919.396 (52.91%) 1024.278 (58.95%) 703.536 (40.49%)
jdk-21.0.2 1839.885 901.053 (48.97%) 1068.209 (58.06%) 716.198 (38.93%)
graalvm_21+35.1 1647.704 1028.21 (62.4%) 1117.696 (67.83%) 869.747 (52.79%)
aliyun_ecs.g8y.large jdk1.8.0_381 2523.28 1119.732 (44.38%) 1363.173 (54.02%) 1042.559 (41.32%)
jdk-11.0.20 2698.996 1167.886 (43.27%) 1371.009 (50.8%) 1091.974 (40.46%)
jdk-17.0.8 2681.976 1299.28 (48.44%) 1413.201 (52.69%) 1151.137 (42.92%)
jdk-21.0.2 2598.035 1195.548 (46.02%) 1589.73 (61.19%) 1087.407 (41.85%)
graalvm_21+35.1 2697.396 1533.282 (56.84%) 1569.35 (58.18%) 1336.181 (49.54%)
orangepi5p jdk1.8.0_381 995.902 455.114 (45.7%) 680.776 (68.36%) 394.618 (39.62%)
jdk-11.0.20 1018.998 473.444 (46.46%) 637.793 (62.59%) 428.329 (42.03%)
jdk-17.0.8 1026.833 570.494 (55.56%) 669.081 (65.16%) 411.985 (40.12%)
jdk-21.0.2 1001.462 507.704 (50.7%) 648.301 (64.74%) 411.62 (41.1%)
graalvm_21+35.1 986.926 582.022 (58.97%) 649.053 (65.77%) 448.288 (45.42%)
orangepi_aipro jdk1.8.0_381 482.225 184.679 (38.3%) 295.206 (61.22%) 166.954 (34.62%)
jdk-11.0.20 516.288 209.549 (40.59%) 307.449 (59.55%) 185.759 (35.98%)
jdk-17.0.8 565.648 262.541 (46.41%) 350.542 (61.97%) 192.118 (33.96%)
jdk-21.0.2 562.122 225.388 (40.1%) 324.5 (57.73%) 195.071 (34.7%)
graalvm_21+35.1 542.746 278.54 (51.32%) 308.181 (56.78%) 204.437 (37.67%)
MacBookM1Pro zulu-8.jdk 9943.929 4241.257 (42.65%) 4782.439 (48.09%) 3986.365 (40.09%)
zulu-11.jdk 5242.493 2712.346 (51.74%) 3375.426 (64.39%) 2688.152 (51.28%)
zulu-17.jdk 10488.36 4314.659 (41.14%) 5086.257 (48.49%) 4368.739 (41.65%)
zulu-21.jdk 10234.234 4038.825 (39.46%) 4924.9 (48.12%) 4142.567 (40.48%)
graalvm_21+35.1 10215.62 5003.531 (48.98%) 4858.966 (47.56%) 4916.512 (48.13%)

这个场景是将没有格式化的JSON字符串UTF8编码的byte[]数组反序列化为JavaBean对象,是最常用的场景,这个是fastjson1的强项。

aliyun ecs spec jdk version fastjson2 fastjson1 jackson gson
aliyun_ecs.c8i.large jdk1.8.0_381 3454.601 1871.592 (54.18%) 1173.645 (33.97%) 904.167 (26.17%)
jdk-11.0.20 2218.043 1673.391 (75.44%) 1113.727 (50.21%) 967.702 (43.63%)
jdk-17.0.8 3822.769 2067.709 (54.09%) 1119.894 (29.3%) 926.831 (24.25%)
jdk-21.0.2 3949.681 2052.949 (51.98%) 1077.6 (27.28%) 907.325 (22.97%)
graalvm_21+35.1 4150.716 2513.715 (60.56%) 1120.892 (27%) 1014.826 (24.45%)
aliyun_ecs.g8y.large jdk1.8.0_381 5628.563 2944.982 (52.32%) 1745.789 (31.02%) 1414.998 (25.14%)
jdk-11.0.20 5333.261 2721.267 (51.02%) 1581.194 (29.65%) 1446.611 (27.12%)
jdk-17.0.8 5868.8 3675.219 (62.62%) 1668.238 (28.43%) 1543.591 (26.3%)
jdk-21.0.2 5791.891 3550.96 (61.31%) 1571.054 (27.13%) 1356.47 (23.42%)
graalvm_21+35.1 6204.269 3405.692 (54.89%) 1476.369 (23.8%) 1318.35 (21.25%)
orangepi5p jdk1.8.0_381 2088.915 1129.751 (54.08%) 717.932 (34.37%) 508.761 (24.36%)
jdk-11.0.20 1178.303 1164.086 (98.79%) 747.454 (63.43%) 552.927 (46.93%)
jdk-17.0.8 2296.256 1422.693 (61.96%) 744.293 (32.41%) 556.987 (24.26%)
jdk-21.0.2 2306.958 1432.816 (62.11%) 758.288 (32.87%) 510.822 (22.14%)
graalvm_21+35.1 2530.014 1287.111 (50.87%) 637.614 (25.2%) 520.328 (20.57%)
orangepi_aipro jdk1.8.0_381 898.449 550.736 (61.3%) 317.57 (35.35%) 228.32 (25.41%)
jdk-11.0.20 785.018 586.511 (74.71%) 325.145 (41.42%) 250.951 (31.97%)
jdk-17.0.8 1221.368 715.609 (58.59%) 353.574 (28.95%) 260.817 (21.35%)
jdk-21.0.2 1226.742 701.149 (57.16%) 327.738 (26.72%) 224.857 (18.33%)
graalvm_21+35.1 1267.471 607.389 (47.92%) 278.317 (21.96%) 233.113 (18.39%)
MacBookM1Pro zulu-8.jdk 16408.741 11092.969 (67.6%) 5362.818 (32.68%) 5332.556 (32.5%)
zulu-11.jdk 1998.324 6542.309 (327.39%) 3718.401 (186.08%) 3775.232 (188.92%)
zulu-17.jdk 17893.641 12975.549 (72.51%) 5210.551 (29.12%) 5612.107 (31.36%)
zulu-21.jdk 18385.938 12772.783 (69.47%) 5538.704 (30.12%) 5181.569 (28.18%)
graalvm_21+35.1 22594.437 11171.749 (49.44%) 5352.206 (23.69%) 4639.213 (20.53%)

这个场景是将格式化过的JSON字符串UTF8编码的byte[]数组反序列化为JavaBean对象

aliyun ecs spec jdk version fastjson2 fastjson1 jackson gson
aliyun_ecs.c8i.large jdk1.8.0_381 2240.695 548.276 (24.47%) 1053.197 (47%) 722.261 (32.23%)
jdk-11.0.20 2357.184 539.934 (22.91%) 1001.591 (42.49%) 740.6 (31.42%)
jdk-17.0.8 2449.141 571.296 (23.33%) 966.511 (39.46%) 706.765 (28.86%)
jdk-21.0.2 2712.073 589.3 (21.73%) 988.88 (36.46%) 689.726 (25.43%)
graalvm_21+35.1 2401.397 775.929 (32.31%) 1016.955 (42.35%) 884.82 (36.85%)
aliyun_ecs.g8y.large jdk1.8.0_381 2222.811 914.801 (41.16%) 1574.322 (70.83%) 1003.145 (45.13%)
jdk-11.0.20 1879.296 927.031 (49.33%) 1500.036 (79.82%) 1096.315 (58.34%)
jdk-17.0.8 4163.981 1008.738 (24.23%) 1494.618 (35.89%) 1125.323 (27.03%)
jdk-21.0.2 4298.055 940.194 (21.87%) 1470.55 (34.21%) 1062.579 (24.72%)
graalvm_21+35.1 4370.434 1134.026 (25.95%) 1346.28 (30.8%) 1327.401 (30.37%)
orangepi5p jdk1.8.0_381 1099.389 388.642 (35.35%) 731.227 (66.51%) 407.804 (37.09%)
jdk-11.0.20 1068.342 403.645 (37.78%) 700.225 (65.54%) 430.393 (40.29%)
jdk-17.0.8 1926.382 448.932 (23.3%) 695.942 (36.13%) 421.085 (21.86%)
jdk-21.0.2 1794.833 381.786 (21.27%) 633.384 (35.29%) 426.108 (23.74%)
graalvm_21+35.1 1990.014 507.759 (25.52%) 621.581 (31.24%) 479.144 (24.08%)
orangepi_aipro jdk1.8.0_381 631.463 148.05 (23.45%) 300.141 (47.53%) 168.046 (26.61%)
jdk-11.0.20 530.442 162.112 (30.56%) 307.037 (57.88%) 190.859 (35.98%)
jdk-17.0.8 926.09 181.407 (19.59%) 310.967 (33.58%) 192.072 (20.74%)
jdk-21.0.2 857.317 158.902 (18.53%) 293.431 (34.23%) 188.195 (21.95%)
graalvm_21+35.1 595.288 198.069 (33.27%) 255.496 (42.92%) 231.596 (38.9%)
MacBookM1Pro zulu-8.jdk 12464.791 3369.023 (27.03%) 5214.039 (41.83%) 3960.635 (31.77%)
zulu-11.jdk 4929.032 2037.012 (41.33%) 3334.785 (67.66%) 2917.661 (59.19%)
zulu-17.jdk 14827.465 2982.497 (20.11%) 4646.835 (31.34%) 4178.401 (28.18%)
zulu-21.jdk 14945.142 3320.656 (22.22%) 5322.425 (35.61%) 4114.321 (27.53%)
graalvm_21+35.1 10809.215 4038.045 (37.36%) 4938.53 (45.69%) 4923.647 (45.55%)

这个场景是二进制序列化比较,JSONB格式、JSON UTF8编码(fastjson2UTF8Bytes)、hessian、javaSerialize的比较,用于Apache dubbo的用户选择二进制协议比较

aliyun ecs spec jdk version jsonb msgpack protobuf
aliyun_ecs.c8i.large jdk1.8.0_381 7966.845 1010.298 (12.68%) 3084.095 (38.71%)
jdk-11.0.20 7570.787 1222.524 (16.15%) 3053.467 (40.33%)
jdk-17.0.8 10533.904 1335.658 (12.68%) 3353.751 (31.84%)
jdk-21.0.2 10689.325 1322.993 (12.38%) 3850.44 (36.02%)
graalvm_21+35.1 12599.097 1399.059 (11.1%) 6891.081 (54.7%)
aliyun_ecs.g8y.large jdk1.8.0_381 9965.398 1314.188 (13.19%) 4776.231 (47.93%)
jdk-11.0.20 10342.456 1859.824 (17.98%) 4242.411 (41.02%)
jdk-17.0.8 13636.91 1952.703 (14.32%) 5123.175 (37.57%)
jdk-21.0.2 14125.086 1873.934 (13.27%) 5397.215 (38.21%)
graalvm_21+35.1 16254.473 1866.64 (11.48%) 10010.966 (61.59%)
orangepi5p jdk1.8.0_381 4509.195 407.5 (9.04%) 2113.855 (46.88%)
jdk-11.0.20 4849.403 664.015 (13.69%) 1762.212 (36.34%)
jdk-17.0.8 5244.428 688.227 (13.12%) 2633.502 (50.22%)
jdk-21.0.2 5407.249 638.918 (11.82%) 2229.554 (41.23%)
graalvm_21+35.1 6316.625 651.301 (10.31%) 3825.773 (60.57%)
orangepi_aipro jdk1.8.0_381 2191.428 210.324 (9.6%) 708.215 (32.32%)
jdk-11.0.20 2402.996 266.867 (11.11%) 702.938 (29.25%)
jdk-17.0.8 2828.442 317.4 (11.22%) 967.725 (34.21%)
jdk-21.0.2 2945.524 309.893 (10.52%) 944.11 (32.05%)
graalvm_21+35.1 3226.836 286.705 (8.89%) 2028.794 (62.87%)
MacBookM1Pro zulu-8.jdk 30945.969 3096.434 (10.01%) 16628.247 (53.73%)
zulu-11.jdk 19538.271 3452.48 (17.67%) 10702.484 (54.78%)
zulu-17.jdk 24403.935 6554.479 (26.86%) 18876.146 (77.35%)
zulu-21.jdk 28319.644 6578.05 (23.23%) 18967.591 (66.98%)
graalvm_21+35.1 27886.832 6172.81 (22.14%) 39654.093 (142.2%)

这个场景是二进制序列化比较,JSONB格式(基于字段顺序映射)、kryo、protobuf的比较

aliyun ecs spec jdk version jsonb kryo protobuf
aliyun_ecs.c8i.large jdk1.8.0_381 9352.232 3601.448 (38.51%) 3417.091 (36.54%)
jdk-11.0.20 14421.716 3675.603 (25.49%) 3243.067 (22.49%)
jdk-17.0.8 15886.835 4245.921 (26.73%) 3363.552 (21.17%)
jdk-21.0.2 16644.186 4233.158 (25.43%) 3400.913 (20.43%)
graalvm_21+35.1 13676.211 5702.582 (41.7%) 6409.661 (46.87%)
aliyun_ecs.g8y.large jdk1.8.0_381 12581.405 4564.334 (36.28%) 4920.651 (39.11%)
jdk-11.0.20 12951.429 5888.072 (45.46%) 5034.966 (38.88%)
jdk-17.0.8 15819.811 6557.951 (41.45%) 5957.693 (37.66%)
jdk-21.0.2 19328.971 6382.028 (33.02%) 5285.474 (27.34%)
graalvm_21+35.1 22932.903 7687.987 (33.52%) 10193.247 (44.45%)
orangepi5p jdk1.8.0_381 4949.046 2252.696 (45.52%) 2057.906 (41.58%)
jdk-11.0.20 5914.368 2796.227 (47.28%) 2414.423 (40.82%)
jdk-17.0.8 6505.123 2909.004 (44.72%) 2324.508 (35.73%)
jdk-21.0.2 6653.761 2125.346 (31.94%) 2516.547 (37.82%)
graalvm_21+35.1 7533.056 2977.597 (39.53%) 3827.392 (50.81%)
orangepi_aipro jdk1.8.0_381 2533.287 1045.312 (41.26%) 628.61 (24.81%)
jdk-11.0.20 2760.722 864.334 (31.31%) 730.505 (26.46%)
jdk-17.0.8 3878.399 1206.263 (31.1%) 946.993 (24.42%)
jdk-21.0.2 3835.01 1114.973 (29.07%) 971.244 (25.33%)
graalvm_21+35.1 4207.925 1392.934 (33.1%) 2026.978 (48.17%)
MacBookM1Pro zulu-8.jdk 35186.246 10381.222 (29.5%) 16904.161 (48.04%)
zulu-11.jdk 38302.788 5987.543 (15.63%) 10873.707 (28.39%)
zulu-17.jdk 47583.006 9135.626 (19.2%) 20547.466 (43.18%)
zulu-21.jdk 52926.913 10715.739 (20.25%) 18075.141 (34.15%)
graalvm_21+35.1 47721.647 15982.836 (33.49%) 37576.937 (78.74%)

这个场景是带类型信息二进制序列化比较,JSONB格式、JSON UTF8编码(fastjson2UTF8Bytes)、hessian、javaSerialize的比较,用于Apache dubbo的用户选择二进制协议比较

aliyun ecs spec jdk version fastjson2JSONB hessian javaSerialize
aliyun_ecs.c8i.large jdk1.8.0_381 3006.699 847.58 (28.19%) 526.529 (17.51%)
jdk-11.0.20 2774.507 813.793 (29.33%) 525.927 (18.96%)
jdk-17.0.8 3230.935 782.229 (24.21%) 550.274 (17.03%)
jdk-21.0.2 3250.177 825.763 (25.41%) 554.021 (17.05%)
graalvm_21+35.1 3171.477 1162.847 (36.67%) 567.599 (17.9%)
aliyun_ecs.g8y.large jdk1.8.0_381 4722.62 1200.414 (25.42%) 873.92 (18.5%)
jdk-11.0.20 4692.628 1029.323 (21.93%) 890.132 (18.97%)
jdk-17.0.8 4612.227 1233.766 (26.75%) 912.189 (19.78%)
jdk-21.0.2 5155.6 1205.909 (23.39%) 926.984 (17.98%)
graalvm_21+35.1 5216.367 1301.707 (24.95%) 850.141 (16.3%)
orangepi5p jdk1.8.0_381 2138.69 435.026 (20.34%) 346.678 (16.21%)
jdk-11.0.20 1938.83 501.595 (25.87%) 377.878 (19.49%)
jdk-17.0.8 1909.828 511.091 (26.76%) 372.938 (19.53%)
jdk-21.0.2 1985.537 509.545 (25.66%) 386.497 (19.47%)
graalvm_21+35.1 2281.058 484.731 (21.25%) 357.663 (15.68%)
orangepi_aipro jdk1.8.0_381 1000.355 223.702 (22.36%) 159.545 (15.95%)
jdk-11.0.20 839.236 225.296 (26.85%) 170.074 (20.27%)
jdk-17.0.8 798.966 253.658 (31.75%) 159.568 (19.97%)
jdk-21.0.2 849.291 234.488 (27.61%) 159.399 (18.77%)
graalvm_21+35.1 1110.377 277.421 (24.98%) 124.879 (11.25%)
MacBookM1Pro zulu-8.jdk 16413.74 2398.059 (14.61%) 3314.519 (20.19%)
zulu-11.jdk 11050.835 2164.349 (19.59%) 2027.681 (18.35%)
zulu-17.jdk 15060.141 2099.487 (13.94%) 3533.485 (23.46%)
zulu-21.jdk 19362.697 2358.874 (12.18%) 3812.654 (19.69%)
graalvm_21+35.1 20234.743 2796.85 (13.82%) 3641.902 (18%)

这个场景是将JavaBean对象序列化为字符串

aliyun ecs spec jdk version fastjson2 fastjson1 jackson gson
aliyun_ecs.c8i.large jdk1.8.0_381 4290.914 1571.392 (36.62%) 2130.975 (49.66%) 1041.436 (24.27%)
jdk-11.0.20 4079.773 1732.45 (42.46%) 1928.378 (47.27%) 636.162 (15.59%)
jdk-17.0.8 4258.796 1457.331 (34.22%) 2006.095 (47.1%) 708.722 (16.64%)
jdk-21.0.2 4751.99 1928.401 (40.58%) 2031.914 (42.76%) 693.984 (14.6%)
graalvm_21+35.1 6189.327 2380.415 (38.46%) 2018.185 (32.61%) 636.79 (10.29%)
aliyun_ecs.g8y.large jdk1.8.0_381 5353.364 2312.285 (43.19%) 2671.423 (49.9%) 1550.89 (28.97%)
jdk-11.0.20 6346.452 2108.07 (33.22%) 2605.219 (41.05%) 1321.952 (20.83%)
jdk-17.0.8 6336.385 2396.009 (37.81%) 2900.54 (45.78%) 936.347 (14.78%)
jdk-21.0.2 6082.547 2038.451 (33.51%) 2755.207 (45.3%) 877.443 (14.43%)
graalvm_21+35.1 8412.243 3494.243 (41.54%) 2978.467 (35.41%) 859.626 (10.22%)
orangepi5p jdk1.8.0_381 2704.276 940.42 (34.78%) 1294.438 (47.87%) 597.585 (22.1%)
jdk-11.0.20 3081.141 1326.499 (43.05%) 1209.848 (39.27%) 533.846 (17.33%)
jdk-17.0.8 3110.686 1003.882 (32.27%) 1397.629 (44.93%) 535.391 (17.21%)
jdk-21.0.2 2842.487 1308.844 (46.05%) 1106.364 (38.92%) 474.493 (16.69%)
graalvm_21+35.1 3710.346 1171.605 (31.58%) 1235.355 (33.29%) 423.26 (11.41%)
orangepi_aipro jdk1.8.0_381 1269.572 362.246 (28.53%) 465.747 (36.69%) 267.281 (21.05%)
jdk-11.0.20 1308.89 377.359 (28.83%) 428.259 (32.72%) 208.336 (15.92%)
jdk-17.0.8 1544.064 580.698 (37.61%) 477.182 (30.9%) 107.023 (6.93%)
jdk-21.0.2 1491.213 367.787 (24.66%) 500.636 (33.57%) 107.957 (7.24%)
graalvm_21+35.1 1638.468 469.871 (28.68%) 512.971 (31.31%) 105.198 (6.42%)
MacBookM1Pro zulu-8.jdk 12137.102 7920.515 (65.26%) 11275.662 (92.9%) 5796.063 (47.75%)
zulu-11.jdk 14038.404 5333.608 (37.99%) 6192.305 (44.11%) 2571.902 (18.32%)
zulu-17.jdk 18306.588 8318.115 (45.44%) 11582.189 (63.27%) 4257.807 (23.26%)
zulu-21.jdk 22700.861 6725.985 (29.63%) 10101.383 (44.5%) 4271.99 (18.82%)
graalvm_21+35.1 20200.475 8591.975 (42.53%) 9418.156 (46.62%) 3380.155 (16.73%)

这个场景是将JSONObject或者Map序列化为字符串

aliyun ecs spec jdk version fastjson2 fastjson1 jackson gson
aliyun_ecs.c8i.large jdk1.8.0_381 3374.401 1970.704 (58.4%) 2086.361 (61.83%) 1089.813 (32.3%)
jdk-11.0.20 2628.655 1810.409 (68.87%) 1903.459 (72.41%) 760.164 (28.92%)
jdk-17.0.8 3321.435 1817.963 (54.73%) 1812.03 (54.56%) 732.82 (22.06%)
jdk-21.0.2 3408.619 1970.776 (57.82%) 1785.056 (52.37%) 730.387 (21.43%)
graalvm_21+35.1 3413.408 1816.912 (53.23%) 1981.34 (58.05%) 672.873 (19.71%)
aliyun_ecs.g8y.large jdk1.8.0_381 3795.784 2423.924 (63.86%) 2764.583 (72.83%) 1634.893 (43.07%)
jdk-11.0.20 4117.215 2634.385 (63.98%) 2821.596 (68.53%) 1300.677 (31.59%)
jdk-17.0.8 4539.693 2758.977 (60.77%) 2750.397 (60.59%) 958.415 (21.11%)
jdk-21.0.2 5086.605 2608.246 (51.28%) 2798.017 (55.01%) 988.57 (19.43%)
graalvm_21+35.1 5113.23 3332.621 (65.18%) 3172.867 (62.05%) 927.433 (18.14%)
orangepi5p jdk1.8.0_381 1802.128 1131.545 (62.79%) 1335.722 (74.12%) 654.896 (36.34%)
jdk-11.0.20 1855.76 1082.82 (58.35%) 1235.086 (66.55%) 617.346 (33.27%)
jdk-17.0.8 2101.058 1141.645 (54.34%) 1278.147 (60.83%) 570.214 (27.14%)
jdk-21.0.2 2123.608 1050.199 (49.45%) 1262.958 (59.47%) 575.358 (27.09%)
graalvm_21+35.1 2021.642 1324.414 (65.51%) 1392.541 (68.88%) 474.778 (23.48%)
orangepi_aipro jdk1.8.0_381 787.467 434.294 (55.15%) 533.218 (67.71%) 289.442 (36.76%)
jdk-11.0.20 768.308 435.337 (56.66%) 484.914 (63.11%) 253.202 (32.96%)
jdk-17.0.8 879.069 444.038 (50.51%) 551.805 (62.77%) 111.036 (12.63%)
jdk-21.0.2 887.893 435.106 (49%) 505.041 (56.88%) 115.305 (12.99%)
graalvm_21+35.1 878.632 536.152 (61.02%) 560.327 (63.77%) 118.54 (13.49%)
MacBookM1Pro zulu-8.jdk 12173.89 9104.019 (74.78%) 9997.99 (82.13%) 6324.614 (51.95%)
zulu-11.jdk 7395.249 5816.386 (78.65%) 5528.848 (74.76%) 2696.42 (36.46%)
zulu-17.jdk 12646.465 7899.679 (62.47%) 8794.777 (69.54%) 4286.176 (33.89%)
zulu-21.jdk 12820.207 7756.146 (60.5%) 7925.543 (61.82%) 4368.832 (34.08%)
graalvm_21+35.1 11386.965 8656.429 (76.02%) 10072.257 (88.45%) 3485.421 (30.61%)

这个场景是将JavaBean对象序列化为UTF8编码的Bytes

aliyun ecs spec jdk version fastjson2 fastjson1 jackson gson
aliyun_ecs.c8i.large jdk1.8.0_381 3821.123 1420.428 (37.17%) 1907.637 (49.92%) 877.697 (22.97%)
jdk-11.0.20 4272.506 1312.156 (30.71%) 1892.485 (44.29%) 709.935 (16.62%)
jdk-17.0.8 4787.646 1336.057 (27.91%) 2008.183 (41.95%) 695.23 (14.52%)
jdk-21.0.2 5073.434 1421.713 (28.02%) 2243.882 (44.23%) 689.888 (13.6%)
graalvm_21+35.1 5906.081 1904.107 (32.24%) 2467.092 (41.77%) 645.228 (10.92%)
aliyun_ecs.g8y.large jdk1.8.0_381 6045.953 2160.513 (35.73%) 2814.044 (46.54%) 1366.34 (22.6%)
jdk-11.0.20 6503.301 2751.128 (42.3%) 2600.883 (39.99%) 1310.596 (20.15%)
jdk-17.0.8 6677.277 2049.711 (30.7%) 2779.544 (41.63%) 885.921 (13.27%)
jdk-21.0.2 6556.926 2768.364 (42.22%) 2715.825 (41.42%) 890.851 (13.59%)
graalvm_21+35.1 8176.755 2275.766 (27.83%) 2969.8 (36.32%) 830.872 (10.16%)
orangepi5p jdk1.8.0_381 3306.578 894.166 (27.04%) 1293.216 (39.11%) 494.474 (14.95%)
jdk-11.0.20 3447.823 897.328 (26.03%) 1220.063 (35.39%) 535.255 (15.52%)
jdk-17.0.8 3298.409 835.352 (25.33%) 1365.652 (41.4%) 491.147 (14.89%)
jdk-21.0.2 3419.198 815.581 (23.85%) 1179.085 (34.48%) 483.088 (14.13%)
graalvm_21+35.1 3992.77 1114.409 (27.91%) 1399.849 (35.06%) 465.218 (11.65%)
orangepi_aipro jdk1.8.0_381 1315.034 321.01 (24.41%) 433.031 (32.93%) 232.297 (17.66%)
jdk-11.0.20 1593.828 330.75 (20.75%) 393.304 (24.68%) 197.575 (12.4%)
jdk-17.0.8 1511.039 347.775 (23.02%) 492.348 (32.58%) 110.195 (7.29%)
jdk-21.0.2 1618.583 333.954 (20.63%) 489.891 (30.27%) 107.221 (6.62%)
graalvm_21+35.1 1636.182 575.84 (35.19%) 480.105 (29.34%) 103.501 (6.33%)
MacBookM1Pro zulu-8.jdk 16616.69 7217.317 (43.43%) 10913.171 (65.68%) 5085.179 (30.6%)
zulu-11.jdk 12639.578 4637.03 (36.69%) 6117.402 (48.4%) 2462.659 (19.48%)
zulu-17.jdk 21405.018 9215.098 (43.05%) 10488.274 (49%) 4167.923 (19.47%)
zulu-21.jdk 19123.434 6645.862 (34.75%) 9151.147 (47.85%) 4097.548 (21.43%)
graalvm_21+35.1 17420.601 9043.979 (51.92%) 10779.609 (61.88%) 3381.24 (19.41%)

这个场景是将JSONObject或者Map序列化为UTF8编码的Bytes

aliyun ecs spec jdk version fastjson2 jackson
aliyun_ecs.c8i.large jdk1.8.0_381 3676.667 1903.213 (51.76%)
jdk-11.0.20 3409.239 1743.436 (51.14%)
jdk-17.0.8 3901.556 1648.708 (42.26%)
jdk-21.0.2 3763.682 1888.927 (50.19%)
graalvm_21+35.1 4210.41 2515.751 (59.75%)
aliyun_ecs.g8y.large jdk1.8.0_381 4735.741 3046.918 (64.34%)
jdk-11.0.20 4528.004 2386.189 (52.7%)
jdk-17.0.8 5027.347 2755.249 (54.81%)
jdk-21.0.2 4860.258 3007.564 (61.88%)
graalvm_21+35.1 6373.152 3549.901 (55.7%)
orangepi5p jdk1.8.0_381 2239.609 1484.03 (66.26%)
jdk-11.0.20 2126.549 1187.01 (55.82%)
jdk-17.0.8 2220.176 1262.666 (56.87%)
jdk-21.0.2 2279.145 1198.013 (52.56%)
graalvm_21+35.1 2484.519 1457.609 (58.67%)
orangepi_aipro jdk1.8.0_381 843.221 525.965 (62.38%)
jdk-11.0.20 761.441 441.985 (58.05%)
jdk-17.0.8 932.932 562.458 (60.29%)
jdk-21.0.2 926.473 532.863 (57.52%)
graalvm_21+35.1 900.234 666.327 (74.02%)
MacBookM1Pro zulu-8.jdk 13159.69 10814.242 (82.18%)
zulu-11.jdk 6721.236 6479.365 (96.4%)
zulu-17.jdk 11988.076 9423.635 (78.61%)
zulu-21.jdk 14305.631 8909.548 (62.28%)
graalvm_21+35.1 13550.387 10539.2 (77.78%)