Skip to content

Latest commit

 

History

History
720 lines (680 loc) · 63.2 KB

benchmark_2.0.49.md

File metadata and controls

720 lines (680 loc) · 63.2 KB

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

aliyun ecs spec jdk version jsonb fury
aliyun_ecs.c8i.large jdk1.8.0_381 6487.209 3959.91 (61.04%)
jdk-11.0.20 4758.02 3911.492 (82.21%)
jdk-17.0.8 6913.014 4448.006 (64.34%)
jdk-21 7303.067 4536.482 (62.12%)
graalvm_21+35.1 8891.458 4798.164 (53.96%)
aliyun_ecs.g8y.large jdk1.8.0_381 2537.042 6888.329 (271.51%)
jdk-11.0.20 8018.24 6524.409 (81.37%)
jdk-17.0.8 9213.569 7486.026 (81.25%)
jdk-21 8935.245 7645.533 (85.57%)
graalvm_21+35.1 10635.507 7572.332 (71.2%)
aws_ecs.c7g.large jdk1.8.0_371 7115.021 6225.858 (87.5%)
jdk-11.0.19 8762.761 6991.496 (79.79%)
jdk-17.0.7 9907.954 7561.596 (76.32%)
zulu21.0.57 9454.319 7168.335 (75.82%)
graalvm_21+35.1 14801.626 7417.511 (50.11%)
orangepi5p jdk1.8.0_381 5191.934 5130.137 (98.81%)
jdk-11.0.20 4615.868 3982.894 (86.29%)
jdk-17.0.8 4253.645 4283.776 (100.71%)
zulu21.32.17 4749.546 4286.664 (90.25%)
graalvm_21+35.1 6080.585 4438.292 (72.99%)
orangepi_aipro jdk1.8.0_381 1492.287 1335.035 (89.46%)
jdk-11.0.20 1777.959 1348.515 (75.85%)
jdk-17.0.8 2016.082 1656.448 (82.16%)
jdk-21 1965.699 1723.572 (87.68%)
graalvm_21+35.1 2078.015 1634.551 (78.66%)
MacBookM1Pro zulu-8.jdk 24905.312 15142.581 (60.8%)
zulu-11.jdk 18348.465 14413.202 (78.55%)
zulu-17.jdk 28555.151 27452.446 (96.14%)
zulu-21.jdk 29018.413 19923.81 (68.66%)
graalvm_21+35.1 35737.44 16675.891 (46.66%)

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

aliyun ecs spec jdk version jsonb fury
aliyun_ecs.c8i.large jdk1.8.0_381 5113.488 3365.112 (65.81%)
jdk-11.0.20 5048.948 3602.481 (71.35%)
jdk-17.0.8 6008.343 4469.059 (74.38%)
jdk-21 6075.782 4027.073 (66.28%)
graalvm_21+35.1 7198.222 4400.041 (61.13%)
aliyun_ecs.g8y.large jdk1.8.0_381 7427.571 6074.179 (81.78%)
jdk-11.0.20 8336.461 6296.826 (75.53%)
jdk-17.0.8 8470.35 7843.134 (92.6%)
jdk-21 8940.93 5870.28 (65.66%)
graalvm_21+35.1 10436.802 6142.584 (58.86%)
aws_ecs.c7g.large jdk1.8.0_371 7852.185 4801.569 (61.15%)
jdk-11.0.19 9986.345 5271.365 (52.79%)
jdk-17.0.7 9933.404 5638.902 (56.77%)
zulu21.0.57 9083.998 6030.155 (66.38%)
graalvm_21+35.1 13244.046 5968.249 (45.06%)
orangepi5p jdk1.8.0_381 4817.395 4086.53 (84.83%)
jdk-11.0.20 4746.463 3882.811 (81.8%)
jdk-17.0.8 5022.881 4624.882 (92.08%)
zulu21.32.17 4515.358 3546.992 (78.55%)
graalvm_21+35.1 5876.344 4044.489 (68.83%)
orangepi_aipro jdk1.8.0_381 1768.865 1136.643 (64.26%)
jdk-11.0.20 1672.932 1241.109 (74.19%)
jdk-17.0.8 1901.301 1238.477 (65.14%)
jdk-21 1967.719 1229.985 (62.51%)
graalvm_21+35.1 2167.123 1350.602 (62.32%)
MacBookM1Pro zulu-8.jdk 23086.319 15553.042 (67.37%)
zulu-11.jdk 20861.755 11751.081 (56.33%)
zulu-17.jdk 33005.04 13615.845 (41.25%)
zulu-21.jdk 33964.461 11080.104 (32.62%)
graalvm_21+35.1 35882.38 16499.303 (45.98%)

这个场景是二进制反序列化比较,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 7421.393 3452.541 (46.52%) 678.417 (9.14%) 115.128 (1.55%)
jdk-11.0.20 7503.857 3508.354 (46.75%) 610.748 (8.14%) 116.805 (1.56%)
jdk-17.0.8 8879.413 3889.348 (43.8%) 633.239 (7.13%) 126.597 (1.43%)
jdk-21 9312.751 3916.743 (42.06%) 673.591 (7.23%) 124.217 (1.33%)
graalvm_21+35.1 10145.21 3936.545 (38.8%) 784.626 (7.73%) 126.334 (1.25%)
aliyun_ecs.g8y.large jdk1.8.0_381 8966.768 5021.142 (56%) 389.758 (4.35%) 175.441 (1.96%)
jdk-11.0.20 9044.421 5429.277 (60.03%) 392.854 (4.34%) 172.432 (1.91%)
jdk-17.0.8 9681.198 5436.662 (56.16%) 392.658 (4.06%) 167.863 (1.73%)
jdk-21 9706.07 5278.873 (54.39%) 488.987 (5.04%) 173.436 (1.79%)
graalvm_21+35.1 12142.172 5869.377 (48.34%) 678.279 (5.59%) 178.621 (1.47%)
aws_ecs.c7g.large jdk1.8.0_371 8295.718 5090.421 (61.36%) 420.669 (5.07%) 164.793 (1.99%)
jdk-11.0.19 10046.427 5427.992 (54.03%) 444.343 (4.42%) 156.419 (1.56%)
jdk-17.0.7 10842.421 6083.094 (56.1%) 519.988 (4.8%) 159.354 (1.47%)
zulu21.0.57 10841.32 5901.411 (54.43%) 640.71 (5.91%) 166.117 (1.53%)
graalvm_21+35.1 17639.764 6843.629 (38.8%) 830.228 (4.71%) 164.082 (0.93%)
orangepi5p jdk1.8.0_381 4761.726 3173.714 (66.65%) 191.079 (4.01%) 112.989 (2.37%)
jdk-11.0.20 5006.634 2950.659 (58.93%) 196.758 (3.93%) 100.608 (2.01%)
jdk-17.0.8 5271.08 2809.08 (53.29%) 193.388 (3.67%) 112.425 (2.13%)
zulu21.32.17 4734.899 3115.876 (65.81%) 169.297 (3.58%) 105.378 (2.23%)
graalvm_21+35.1 6789.446 3403.64 (50.13%) 232.66 (3.43%) 100.455 (1.48%)
orangepi_aipro jdk1.8.0_381 1709.883 1050.976 (61.46%) 145.155 (8.49%) 30.18 (1.77%)
jdk-11.0.20 2136.812 1137.298 (53.22%) 124.972 (5.85%) 28.806 (1.35%)
jdk-17.0.8 2378.053 1188.168 (49.96%) 148.822 (6.26%) 29.446 (1.24%)
jdk-21 2318.493 1220.111 (52.63%) 128.037 (5.52%) 27.374 (1.18%)
graalvm_21+35.1 2478.066 1244.352 (50.21%) 205.085 (8.28%) 27.246 (1.1%)
MacBookM1Pro zulu-8.jdk 37526.969 16486.025 (43.93%) 817.781 (2.18%) 446.142 (1.19%)
zulu-11.jdk 25224.784 12884.341 (51.08%) 601.908 (2.39%) 316.008 (1.25%)
zulu-17.jdk 45157.179 18271.81 (40.46%) 707.108 (1.57%) 556.09 (1.23%)
zulu-21.jdk 43067.751 17882.835 (41.52%) 746.571 (1.73%) 542.155 (1.26%)
graalvm_21+35.1 53926.657 23050.451 (42.74%) 1126.677 (2.09%) 516.984 (0.96%)

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

aliyun ecs spec jdk version jsonb kryo protobuf
aliyun_ecs.c8i.large jdk1.8.0_381 10402.879 3474.284 (33.4%) 3019.902 (29.03%)
jdk-11.0.20 10465.935 3466.206 (33.12%) 2906.478 (27.77%)
jdk-17.0.8 12945.348 3182.358 (24.58%) 3573.722 (27.61%)
jdk-21 13786.575 3560.776 (25.83%) 3711.798 (26.92%)
graalvm_21+35.1 15725.867 3982.387 (25.32%) 5541.347 (35.24%)
aliyun_ecs.g8y.large jdk1.8.0_381 11383.458 4686.778 (41.17%) 3048.746 (26.78%)
jdk-11.0.20 11055.803 4913.451 (44.44%) 3770.3 (34.1%)
jdk-17.0.8 11813.794 5563.195 (47.09%) 4772.716 (40.4%)
jdk-21 11925.341 5465.367 (45.83%) 4946.381 (41.48%)
graalvm_21+35.1 20920.835 5118.746 (24.47%) 7295.772 (34.87%)
aws_ecs.c7g.large jdk1.8.0_371 9159.466 5833.49 (63.69%) 3423.194 (37.37%)
jdk-11.0.19 11241.786 5704.188 (50.74%) 3675.763 (32.7%)
jdk-17.0.7 12148.62 6663.485 (54.85%) 5227.154 (43.03%)
zulu21.0.57 11589.315 6121.904 (52.82%) 4858.835 (41.93%)
graalvm_21+35.1 23506.375 5930.139 (25.23%) 9544.34 (40.6%)
orangepi5p jdk1.8.0_381 5698.68 3183.436 (55.86%) 1821.924 (31.97%)
jdk-11.0.20 6068.071 2909.94 (47.95%) 2060.693 (33.96%)
jdk-17.0.8 5143.426 2743.678 (53.34%) 2559.25 (49.76%)
zulu21.32.17 6037.993 2747.668 (45.51%) 2895.634 (47.96%)
graalvm_21+35.1 8328.823 2792.072 (33.52%) 3534.117 (42.43%)
orangepi_aipro jdk1.8.0_381 2108.675 1096.366 (51.99%) 561.293 (26.62%)
jdk-11.0.20 2769.57 945.852 (34.15%) 737.837 (26.64%)
jdk-17.0.8 2875.089 1197.865 (41.66%) 980.489 (34.1%)
jdk-21 2873.62 1113.262 (38.74%) 1027.776 (35.77%)
graalvm_21+35.1 3733.329 1001.69 (26.83%) 1254.719 (33.61%)
MacBookM1Pro zulu-8.jdk 48786.406 12516.065 (25.65%) 12440.624 (25.5%)
zulu-11.jdk 35319.916 12623.784 (35.74%) 8492.369 (24.04%)
zulu-17.jdk 57507.982 15216.623 (26.46%) 17861.072 (31.06%)
zulu-21.jdk 55068.489 11831.259 (21.48%) 16100.416 (29.24%)
graalvm_21+35.1 76647.898 17001.292 (22.18%) 32474.445 (42.37%)

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

aliyun ecs spec jdk version fastjson2JSONB hessian javaSerialize
aliyun_ecs.c8i.large jdk1.8.0_381 4273.427 673.163 (15.75%) 114.483 (2.68%)
jdk-11.0.20 4293.386 625.646 (14.57%) 116.535 (2.71%)
jdk-17.0.8 4791.239 649.84 (13.56%) 127.799 (2.67%)
jdk-21 4733.91 664.284 (14.03%) 124.386 (2.63%)
graalvm_21+35.1 5538.58 792.433 (14.31%) 125.118 (2.26%)
aliyun_ecs.g8y.large jdk1.8.0_381 5474.657 405.007 (7.4%) 172.45 (3.15%)
jdk-11.0.20 5896.88 461.114 (7.82%) 161.83 (2.74%)
jdk-17.0.8 6100.952 432.179 (7.08%) 166.101 (2.72%)
jdk-21 5944.323 490.61 (8.25%) 175.039 (2.94%)
graalvm_21+35.1 6914.409 822.556 (11.9%) 174.776 (2.53%)
aws_ecs.c7g.large jdk1.8.0_371 5323.821 433.287 (8.14%) 161.357 (3.03%)
jdk-11.0.19 2815.09 465.357 (16.53%) 156.994 (5.58%)
jdk-17.0.7 6736.473 602.858 (8.95%) 161.552 (2.4%)
zulu21.0.57 6640.592 606.797 (9.14%) 166.957 (2.51%)
graalvm_21+35.1 8745.756 777.528 (8.89%) 174.749 (2%)
orangepi5p jdk1.8.0_381 2752.387 190.229 (6.91%) 108.57 (3.94%)
jdk-11.0.20 2924.091 184.913 (6.32%) 103.658 (3.54%)
jdk-17.0.8 2933.045 192.248 (6.55%) 102.354 (3.49%)
zulu21.32.17 2908.494 175.445 (6.03%) 96.382 (3.31%)
graalvm_21+35.1 3646.549 237.011 (6.5%) 105.924 (2.9%)
orangepi_aipro jdk1.8.0_381 868.91 141.843 (16.32%) 29.941 (3.45%)
jdk-11.0.20 1165.027 121.569 (10.43%) 30.053 (2.58%)
jdk-17.0.8 1296.32 150.023 (11.57%) 28.917 (2.23%)
jdk-21 1280.935 133.749 (10.44%) 27.976 (2.18%)
graalvm_21+35.1 1461.786 212.465 (14.53%) 26.173 (1.79%)
MacBookM1Pro zulu-8.jdk 20717.05 803.36 (3.88%) 439.325 (2.12%)
zulu-11.jdk 15696.616 590.548 (3.76%) 339.256 (2.16%)
zulu-17.jdk 24760.329 698.953 (2.82%) 548.235 (2.21%)
zulu-21.jdk 23848.879 775.366 (3.25%) 530.422 (2.22%)
graalvm_21+35.1 27497.393 1066.45 (3.88%) 508.175 (1.85%)

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

aliyun ecs spec jdk version fastjson2 fastjson1 jackson gson
aliyun_ecs.c8i.large jdk1.8.0_381 3126.931 2183.739 (69.84%) 919.022 (29.39%) 911.984 (29.17%)
jdk-11.0.20 3512.218 1953.865 (55.63%) 959.897 (27.33%) 974.606 (27.75%)
jdk-17.0.8 3834.997 2616.517 (68.23%) 986.157 (25.71%) 1004.607 (26.2%)
jdk-21 3906.312 2560.378 (65.54%) 948.615 (24.28%) 909.12 (23.27%)
graalvm_21+35.1 3836.943 3644.181 (94.98%) 1018.658 (26.55%) 1072.927 (27.96%)
aliyun_ecs.g8y.large jdk1.8.0_381 4959.557 3385.718 (68.27%) 1240.273 (25.01%) 1587.453 (32.01%)
jdk-11.0.20 5565.07 3230.818 (58.06%) 1252.351 (22.5%) 1526.047 (27.42%)
jdk-17.0.8 5605.467 4217.777 (75.24%) 1310.883 (23.39%) 1542.681 (27.52%)
jdk-21 5573.786 4273.817 (76.68%) 451.869 (8.11%) 1374.989 (24.67%)
graalvm_21+35.1 5831.613 5318.735 (91.21%) 1291.297 (22.14%) 1378.644 (23.64%)
aws_ecs.c7g.large jdk1.8.0_371 4517.672 3108.625 (68.81%) 1255.13 (27.78%) 1411.052 (31.23%)
jdk-11.0.19 5670.338 3213.867 (56.68%) 1304.194 (23%) 1461.256 (25.77%)
jdk-17.0.7 6211.853 4616.648 (74.32%) 602.546 (9.7%) 1413.869 (22.76%)
zulu21.0.57 6061.204 4437.669 (73.21%) 1255.218 (20.71%) 1226.357 (20.23%)
graalvm_21+35.1 7512.097 5701.576 (75.9%) 1375.028 (18.3%) 1364.982 (18.17%)
orangepi5p jdk1.8.0_381 3032.029 1996.613 (65.85%) 823.833 (27.17%) 810.789 (26.74%)
jdk-11.0.20 3164.042 1978.388 (62.53%) 844.187 (26.68%) 809.067 (25.57%)
jdk-17.0.8 2727.632 2770.617 (101.58%) 852.117 (31.24%) 828.382 (30.37%)
zulu21.32.17 3226.001 2163.848 (67.08%) 764.17 (23.69%) 710.555 (22.03%)
graalvm_21+35.1 3532.915 3154.771 (89.3%) 771.51 (21.84%) 744.584 (21.08%)
orangepi_aipro jdk1.8.0_381 1070.464 684.867 (63.98%) 273.656 (25.56%) 258.325 (24.13%)
jdk-11.0.20 1146.025 663.765 (57.92%) 282.458 (24.65%) 252.649 (22.05%)
jdk-17.0.8 1228.592 1018.487 (82.9%) 304.467 (24.78%) 261.2 (21.26%)
jdk-21 1238.571 988.192 (79.78%) 278.214 (22.46%) 220.995 (17.84%)
graalvm_21+35.1 1280.548 1059.133 (82.71%) 262.491 (20.5%) 215.929 (16.86%)
MacBookM1Pro zulu-8.jdk 18966.371 11722.819 (61.81%) 1871.059 (9.87%) 5109.694 (26.94%)
zulu-11.jdk 14146.745 7139.255 (50.47%) 2497.981 (17.66%) 4005.804 (28.32%)
zulu-17.jdk 19453.546 16416.441 (84.39%) 2666.731 (13.71%) 5668.594 (29.14%)
zulu-21.jdk 19421.157 16460.186 (84.75%) 2897.753 (14.92%) 5309.002 (27.34%)
graalvm_21+35.1 21400.363 15729.448 (73.5%) 2897.409 (13.54%) 4884.852 (22.83%)

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

aliyun ecs spec jdk version fastjson2 fastjson1 jackson gson
aliyun_ecs.c8i.large jdk1.8.0_381 1513.477 592.88 (39.17%) 910.325 (60.15%) 921.225 (60.87%)
jdk-11.0.20 2351.891 574.949 (24.45%) 756.875 (32.18%) 832.965 (35.42%)
jdk-17.0.8 2581.747 633.896 (24.55%) 888.211 (34.4%) 855.259 (33.13%)
jdk-21 2693.452 639.021 (23.72%) 895.255 (33.24%) 866.977 (32.19%)
graalvm_21+35.1 2369.984 858.532 (36.23%) 947.267 (39.97%) 965.947 (40.76%)
aliyun_ecs.g8y.large jdk1.8.0_381 2036.369 929.684 (45.65%) 1149.272 (56.44%) 1460.937 (71.74%)
jdk-11.0.20 4025.882 970.996 (24.12%) 1144.213 (28.42%) 1391.844 (34.57%)
jdk-17.0.8 4006.117 1036.027 (25.86%) 1261.081 (31.48%) 1448.692 (36.16%)
jdk-21 3915.534 958.448 (24.48%) 1179.277 (30.12%) 1229.078 (31.39%)
graalvm_21+35.1 4349.615 1337.775 (30.76%) 1239.331 (28.49%) 1309.16 (30.1%)
aws_ecs.c7g.large jdk1.8.0_371 2451.258 884.818 (36.1%) 1153.86 (47.07%) 1292.995 (52.75%)
jdk-11.0.19 2653.669 900.328 (33.93%) 485.977 (18.31%) 1375.195 (51.82%)
jdk-17.0.7 4430.201 1049.502 (23.69%) 1206.103 (27.22%) 1380.498 (31.16%)
zulu21.0.57 4387.365 931.231 (21.23%) 1222.877 (27.87%) 1270.64 (28.96%)
graalvm_21+35.1 4036.672 1357.006 (33.62%) 1276.414 (31.62%) 1260.87 (31.24%)
orangepi5p jdk1.8.0_381 1218.052 544.864 (44.73%) 824.072 (67.65%) 751.45 (61.69%)
jdk-11.0.20 1291.265 559.743 (43.35%) 767.044 (59.4%) 750.322 (58.11%)
jdk-17.0.8 2441.666 627.399 (25.7%) 787.856 (32.27%) 702.815 (28.78%)
zulu21.32.17 2338.614 523.483 (22.38%) 688.715 (29.45%) 691.05 (29.55%)
graalvm_21+35.1 2616.655 681.003 (26.03%) 685.398 (26.19%) 673.913 (25.75%)
orangepi_aipro jdk1.8.0_381 709.911 167.486 (23.59%) 264.371 (37.24%) 229.948 (32.39%)
jdk-11.0.20 808.778 174.29 (21.55%) 255.236 (31.56%) 227.923 (28.18%)
jdk-17.0.8 951.501 205.728 (21.62%) 259.489 (27.27%) 241.825 (25.42%)
jdk-21 895.539 179.321 (20.02%) 264.79 (29.57%) 209.266 (23.37%)
graalvm_21+35.1 772.144 240.389 (31.13%) 243.505 (31.54%) 217.999 (28.23%)
MacBookM1Pro zulu-8.jdk 12728.814 3098.394 (24.34%) 2308.946 (18.14%) 4541.153 (35.68%)
zulu-11.jdk 10017.07 1958.23 (19.55%) 2381.478 (23.77%) 3396.166 (33.9%)
zulu-17.jdk 15497.666 3422.428 (22.08%) 2748.611 (17.74%) 5278.182 (34.06%)
zulu-21.jdk 16069.279 3630.571 (22.59%) 2804.271 (17.45%) 4917.667 (30.6%)
graalvm_21+35.1 11965.773 4393.476 (36.72%) 2447.579 (20.45%) 4773.451 (39.89%)

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

aliyun ecs spec jdk version fastjson2 fastjson1 jackson gson
aliyun_ecs.c8i.large jdk1.8.0_381 2076.113 1118.781 (53.89%) 1131.462 (54.5%) 833.716 (40.16%)
jdk-11.0.20 1761.354 1007.559 (57.2%) 869.558 (49.37%) 773.139 (43.89%)
jdk-17.0.8 2324.448 1206.369 (51.9%) 1042.088 (44.83%) 804.155 (34.6%)
jdk-21 2382.848 1174.11 (49.27%) 1083.923 (45.49%) 784.102 (32.91%)
graalvm_21+35.1 1974.878 1490.779 (75.49%) 1211.141 (61.33%) 949.699 (48.09%)
aliyun_ecs.g8y.large jdk1.8.0_381 2808.596 1358.925 (48.38%) 1093.361 (38.93%) 1245.473 (44.35%)
jdk-11.0.20 2982.173 1454.542 (48.77%) 1142.21 (38.3%) 1180.491 (39.58%)
jdk-17.0.8 2973.713 1608.984 (54.11%) 1098.38 (36.94%) 1247.607 (41.95%)
jdk-21 2939.246 1374.247 (46.76%) 943.554 (32.1%) 1157.729 (39.39%)
graalvm_21+35.1 3279.792 2286.799 (69.72%) 1477.402 (45.05%) 1448.779 (44.17%)
aws_ecs.c7g.large jdk1.8.0_371 2752.936 1296.556 (47.1%) 678.058 (24.63%) 1062.39 (38.59%)
jdk-11.0.19 3238.667 1496.668 (46.21%) 1177.476 (36.36%) 1110.411 (34.29%)
jdk-17.0.7 3406.579 1605.617 (47.13%) 1305.294 (38.32%) 1217.231 (35.73%)
zulu21.0.57 3281.686 1415.416 (43.13%) 879.638 (26.8%) 1099.276 (33.5%)
graalvm_21+35.1 3871.59 2642.255 (68.25%) 1603.79 (41.42%) 1379.01 (35.62%)
orangepi5p jdk1.8.0_381 1525.944 750.418 (49.18%) 744.709 (48.8%) 636.803 (41.73%)
jdk-11.0.20 1467.814 833.779 (56.8%) 785.093 (53.49%) 623.034 (42.45%)
jdk-17.0.8 1554.7 970.753 (62.44%) 782.997 (50.36%) 658.802 (42.37%)
zulu21.32.17 1437.003 853.765 (59.41%) 826.707 (57.53%) 599.175 (41.7%)
graalvm_21+35.1 1650.5 1229.059 (74.47%) 883.055 (53.5%) 657.778 (39.85%)
orangepi_aipro jdk1.8.0_381 539.055 249.488 (46.28%) 243.136 (45.1%) 195.282 (36.23%)
jdk-11.0.20 652.502 277.307 (42.5%) 293.206 (44.94%) 215.459 (33.02%)
jdk-17.0.8 694.141 340.188 (49.01%) 301.19 (43.39%) 214.39 (30.89%)
jdk-21 667.515 277.411 (41.56%) 313.556 (46.97%) 207.661 (31.11%)
graalvm_21+35.1 635.117 433.091 (68.19%) 307.245 (48.38%) 237.774 (37.44%)
MacBookM1Pro zulu-8.jdk 11759.971 4836.909 (41.13%) 29.228 (0.25%) 4105.322 (34.91%)
zulu-11.jdk 6150.591 3523.289 (57.28%) 2467.281 (40.11%) 3548.904 (57.7%)
zulu-17.jdk 12920.296 5943.258 (46%) 2439.549 (18.88%) 4328.55 (33.5%)
zulu-21.jdk 12312.524 5551.019 (45.08%) 2556.751 (20.77%) 4239.882 (34.44%)
graalvm_21+35.1 11928.752 8620.995 (72.27%) 2897.166 (24.29%) 4482.318 (37.58%)

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

aliyun ecs spec jdk version fastjson2 fastjson1 jackson gson
aliyun_ecs.c8i.large jdk1.8.0_381 1488.144 962.01 (64.64%) 1034.084 (69.49%) 798.222 (53.64%)
jdk-11.0.20 1564.506 937.653 (59.93%) 849.642 (54.31%) 755.468 (48.29%)
jdk-17.0.8 1748.971 1046.185 (59.82%) 938.476 (53.66%) 739.823 (42.3%)
jdk-21 1808.114 1032.256 (57.09%) 976.934 (54.03%) 746.673 (41.3%)
graalvm_21+35.1 1701.736 1274.042 (74.87%) 1025.134 (60.24%) 882.856 (51.88%)
aliyun_ecs.g8y.large jdk1.8.0_381 2414.443 1296.869 (53.71%) 1042.448 (43.18%) 1159.642 (48.03%)
jdk-11.0.20 2572.854 1291.491 (50.2%) 1090.758 (42.39%) 1142.429 (44.4%)
jdk-17.0.8 2589.606 1423.829 (54.98%) 1232.753 (47.6%) 1120.529 (43.27%)
jdk-21 2425.297 1268.433 (52.3%) 619.536 (25.54%) 1081.58 (44.6%)
graalvm_21+35.1 2765.835 1856.021 (67.11%) 1050.001 (37.96%) 1281.126 (46.32%)
aws_ecs.c7g.large jdk1.8.0_371 2375.928 1124.293 (47.32%) 1093.837 (46.04%) 1002.111 (42.18%)
jdk-11.0.19 2877.07 1224.36 (42.56%) 845.069 (29.37%) 1068.731 (37.15%)
jdk-17.0.7 3034.326 1501.752 (49.49%) 1192.224 (39.29%) 1137.252 (37.48%)
zulu21.0.57 2831.835 1268.712 (44.8%) 1141.773 (40.32%) 1044.745 (36.89%)
graalvm_21+35.1 3297.313 2288.091 (69.39%) 1508.889 (45.76%) 1383.407 (41.96%)
orangepi5p jdk1.8.0_381 1325.2 702.971 (53.05%) 763.054 (57.58%) 625.985 (47.24%)
jdk-11.0.20 1369.126 671.052 (49.01%) 747.605 (54.6%) 604.455 (44.15%)
jdk-17.0.8 1399.811 885.844 (63.28%) 757.648 (54.13%) 596.731 (42.63%)
zulu21.32.17 1401.186 751.477 (53.63%) 673.653 (48.08%) 591.422 (42.21%)
graalvm_21+35.1 1331.36 1013.188 (76.1%) 782.016 (58.74%) 599.324 (45.02%)
orangepi_aipro jdk1.8.0_381 493.565 209.935 (42.53%) 224.22 (45.43%) 190.389 (38.57%)
jdk-11.0.20 516.994 217.416 (42.05%) 260.238 (50.34%) 193.336 (37.4%)
jdk-17.0.8 572.559 292.168 (51.03%) 285.534 (49.87%) 195.017 (34.06%)
jdk-21 564.555 235.67 (41.74%) 283.83 (50.27%) 200.505 (35.52%)
graalvm_21+35.1 538.783 363.216 (67.41%) 232.331 (43.12%) 230.799 (42.84%)
MacBookM1Pro zulu-8.jdk 10165.128 4240.395 (41.72%) 2345.335 (23.07%) 3916.214 (38.53%)
zulu-11.jdk 5480.775 3068.125 (55.98%) 2238.242 (40.84%) 3318.788 (60.55%)
zulu-17.jdk 10401.898 5689.193 (54.69%) 2697.56 (25.93%) 4121.128 (39.62%)
zulu-21.jdk 10281.811 4681.723 (45.53%) 2796.108 (27.19%) 3977.108 (38.68%)
graalvm_21+35.1 10205.686 6934.866 (67.95%) 2874.399 (28.16%) 4406.174 (43.17%)

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

aliyun ecs spec jdk version fastjson2 fastjson1 jackson gson
aliyun_ecs.c8i.large jdk1.8.0_381 2136.703 1043.18 (48.82%) 1231.636 (57.64%) 789.26 (36.94%)
jdk-11.0.20 2268.208 926.936 (40.87%) 1054.383 (46.49%) 755.065 (33.29%)
jdk-17.0.8 2402.448 1100.217 (45.8%) 1108.273 (46.13%) 778.088 (32.39%)
jdk-21 2459.124 1052.864 (42.81%) 1142.629 (46.46%) 769.136 (31.28%)
graalvm_21+35.1 2271.549 1299.771 (57.22%) 1255.367 (55.26%) 931.805 (41.02%)
aliyun_ecs.g8y.large jdk1.8.0_381 2778.751 1163.901 (41.89%) 1269.361 (45.68%) 1130.364 (40.68%)
jdk-11.0.20 3006.059 1282.111 (42.65%) 1391.322 (46.28%) 1118.578 (37.21%)
jdk-17.0.8 2989.441 1391.876 (46.56%) 1369.406 (45.81%) 1182.138 (39.54%)
jdk-21 2971.765 1284.296 (43.22%) 1317.776 (44.34%) 1122.287 (37.76%)
graalvm_21+35.1 3227.68 1854.154 (57.45%) 1627.299 (50.42%) 1415.826 (43.87%)
aws_ecs.c7g.large jdk1.8.0_371 2685.09 1152.239 (42.91%) 1309.58 (48.77%) 971.899 (36.2%)
jdk-11.0.19 3227.742 1324.168 (41.02%) 1333.208 (41.3%) 1048.242 (32.48%)
jdk-17.0.7 3487.543 1470.423 (42.16%) 1685.287 (48.32%) 1157.739 (33.2%)
zulu21.0.57 3416.708 1346.218 (39.4%) 1699.294 (49.73%) 1155.445 (33.82%)
graalvm_21+35.1 4134.698 1937.047 (46.85%) 1634.354 (39.53%) 1286.671 (31.12%)
orangepi5p jdk1.8.0_381 1465.248 677.062 (46.21%) 851.097 (58.09%) 603.861 (41.21%)
jdk-11.0.20 1555.954 749.531 (48.17%) 887.055 (57.01%) 607.103 (39.02%)
jdk-17.0.8 1640.667 788.959 (48.09%) 956.437 (58.3%) 625.363 (38.12%)
zulu21.32.17 1591.023 766.831 (48.2%) 892.883 (56.12%) 595.376 (37.42%)
graalvm_21+35.1 1606.725 948.968 (59.06%) 944.757 (58.8%) 613.336 (38.17%)
orangepi_aipro jdk1.8.0_381 538.104 217.045 (40.34%) 291.488 (54.17%) 177.543 (32.99%)
jdk-11.0.20 612.162 252.936 (41.32%) 316.002 (51.62%) 195.392 (31.92%)
jdk-17.0.8 695.225 306.642 (44.11%) 375.842 (54.06%) 205.34 (29.54%)
jdk-21 665.876 255.481 (38.37%) 374.135 (56.19%) 203.639 (30.58%)
graalvm_21+35.1 652.977 334.671 (51.25%) 219.368 (33.6%) 211.997 (32.47%)
MacBookM1Pro zulu-8.jdk 11786.497 4831.761 (40.99%) 2999.924 (25.45%) 4604.201 (39.06%)
zulu-11.jdk 6752.326 3209.231 (47.53%) 3258.179 (48.25%) 3227.329 (47.8%)
zulu-17.jdk 13060.024 5552.091 (42.51%) 4196.941 (32.14%) 4331.474 (33.17%)
zulu-21.jdk 12490.348 4924.591 (39.43%) 2778.904 (22.25%) 4187.484 (33.53%)
graalvm_21+35.1 11977.2 6271.37 (52.36%) 2677.536 (22.36%) 4534.456 (37.86%)

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

aliyun ecs spec jdk version fastjson2 fastjson1 jackson gson
aliyun_ecs.c8i.large jdk1.8.0_381 1486.746 875.432 (58.88%) 1096.319 (73.74%) 739.934 (49.77%)
jdk-11.0.20 1485.33 802.177 (54.01%) 944.434 (63.58%) 716.456 (48.24%)
jdk-17.0.8 1801.818 937.529 (52.03%) 1025.889 (56.94%) 735.269 (40.81%)
jdk-21 1828.731 916.88 (50.14%) 1066.296 (58.31%) 707.653 (38.7%)
graalvm_21+35.1 1631.332 1069.193 (65.54%) 1091.254 (66.89%) 901.785 (55.28%)
aliyun_ecs.g8y.large jdk1.8.0_381 2367.252 1093.876 (46.21%) 1275.903 (53.9%) 1071.143 (45.25%)
jdk-11.0.20 2575.056 1104.989 (42.91%) 1192.491 (46.31%) 1102.253 (42.81%)
jdk-17.0.8 2511.119 1213.224 (48.31%) 1352.905 (53.88%) 1128.873 (44.95%)
jdk-21 2497.925 1154.618 (46.22%) 1242.909 (49.76%) 1047.342 (41.93%)
graalvm_21+35.1 2637.389 1545.795 (58.61%) 1470.747 (55.77%) 1308.442 (49.61%)
aws_ecs.c7g.large jdk1.8.0_371 2377.736 994.06 (41.81%) 1358.367 (57.13%) 944.523 (39.72%)
jdk-11.0.19 2904.287 1132.907 (39.01%) 1385.912 (47.72%) 993.684 (34.21%)
jdk-17.0.7 3046.36 1312.995 (43.1%) 1383.921 (45.43%) 1139.84 (37.42%)
zulu21.0.57 3008.26 1162.738 (38.65%) 1618.088 (53.79%) 1012.746 (33.67%)
graalvm_21+35.1 3019.315 1584.017 (52.46%) 1553.564 (51.45%) 1275.821 (42.26%)
orangepi5p jdk1.8.0_381 1337.986 584.162 (43.66%) 919.535 (68.73%) 560.405 (41.88%)
jdk-11.0.20 1399.834 597.994 (42.72%) 867.313 (61.96%) 580.917 (41.5%)
jdk-17.0.8 1413.781 761.357 (53.85%) 872.954 (61.75%) 568.521 (40.21%)
zulu21.32.17 1258.551 667.248 (53.02%) 825.113 (65.56%) 557.598 (44.3%)
graalvm_21+35.1 1424.032 783.23 (55%) 846.397 (59.44%) 633.493 (44.49%)
orangepi_aipro jdk1.8.0_381 487.674 181.676 (37.25%) 280.812 (57.58%) 162.992 (33.42%)
jdk-11.0.20 527.281 198.875 (37.72%) 283.505 (53.77%) 195.595 (37.1%)
jdk-17.0.8 575.038 260.199 (45.25%) 343.17 (59.68%) 185.564 (32.27%)
jdk-21 563.521 225.246 (39.97%) 337.453 (59.88%) 179.515 (31.86%)
graalvm_21+35.1 550.625 283.203 (51.43%) 301.08 (54.68%) 186.39 (33.85%)
MacBookM1Pro zulu-8.jdk 10261.41 4270.89 (41.62%) 2745.181 (26.75%) 3904.614 (38.05%)
zulu-11.jdk 5617.284 2791.29 (49.69%) 2871.252 (51.11%) 3028.498 (53.91%)
zulu-17.jdk 10681.886 4192.895 (39.25%) 4221.702 (39.52%) 4298.93 (40.25%)
zulu-21.jdk 10517.999 4273.374 (40.63%) 4191.14 (39.85%) 4226.828 (40.19%)
graalvm_21+35.1 10517.908 4416.262 (41.99%) 4453.675 (42.34%) 4781.016 (45.46%)

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

aliyun ecs spec jdk version fastjson2 fastjson1 jackson gson
aliyun_ecs.c8i.large jdk1.8.0_381 1943.416 1858.577 (95.63%) 1173.946 (60.41%) 900.095 (46.32%)
jdk-11.0.20 3491.407 1689.936 (48.4%) 1040.799 (29.81%) 961.516 (27.54%)
jdk-17.0.8 3904.662 2035.649 (52.13%) 1095.697 (28.06%) 922.199 (23.62%)
jdk-21 3999.135 2086.337 (52.17%) 1085.72 (27.15%) 924.023 (23.11%)
graalvm_21+35.1 3983.895 2478.331 (62.21%) 1092.358 (27.42%) 1047.834 (26.3%)
aliyun_ecs.g8y.large jdk1.8.0_381 5066.705 2901.714 (57.27%) 1524.394 (30.09%) 1440.443 (28.43%)
jdk-11.0.20 2327.135 2773.199 (119.17%) 1513.371 (65.03%) 1419.596 (61%)
jdk-17.0.8 5520.607 3287.524 (59.55%) 1523.272 (27.59%) 1532.158 (27.75%)
jdk-21 5142.198 3284.721 (63.88%) 1463.214 (28.46%) 1340.143 (26.06%)
graalvm_21+35.1 6048.859 3298.951 (54.54%) 1421.91 (23.51%) 1350.074 (22.32%)
aws_ecs.c7g.large jdk1.8.0_371 2067.815 2559.222 (123.76%) 1602.95 (77.52%) 1268.99 (61.37%)
jdk-11.0.19 5550.694 2736.483 (49.3%) 1514.233 (27.28%) 1370.626 (24.69%)
jdk-17.0.7 6157.199 3402.815 (55.27%) 1752.979 (28.47%) 1368.289 (22.22%)
zulu21.0.57 5870.585 3185.101 (54.26%) 1537.234 (26.19%) 1293.629 (22.04%)
graalvm_21+35.1 6469.982 3183.079 (49.2%) 1485.273 (22.96%) 1344.515 (20.78%)
orangepi5p jdk1.8.0_381 2280.509 1564.922 (68.62%) 953.941 (41.83%) 724.662 (31.78%)
jdk-11.0.20 1317.278 1556.983 (118.2%) 896.737 (68.08%) 774.975 (58.83%)
jdk-17.0.8 3128.401 1962.209 (62.72%) 818.977 (26.18%) 678.445 (21.69%)
zulu21.32.17 2728.333 1809.663 (66.33%) 880.762 (32.28%) 665.924 (24.41%)
graalvm_21+35.1 3913.066 1654.745 (42.29%) 790.082 (20.19%) 714.41 (18.26%)
orangepi_aipro jdk1.8.0_381 1023.615 558.261 (54.54%) 295.098 (28.83%) 236.257 (23.08%)
jdk-11.0.20 983.429 551.374 (56.07%) 312.269 (31.75%) 248.469 (25.27%)
jdk-17.0.8 1108.156 772.881 (69.74%) 329.508 (29.73%) 265.542 (23.96%)
jdk-21 1152.363 722.997 (62.74%) 312.145 (27.09%) 221.169 (19.19%)
graalvm_21+35.1 1325.757 620.266 (46.79%) 267.911 (20.21%) 227.246 (17.14%)
MacBookM1Pro zulu-8.jdk 2242.696 10885.06 (485.36%) 2122.911 (94.66%) 4985.305 (222.29%)
zulu-11.jdk 13126.232 6370.596 (48.53%) 2370.691 (18.06%) 3642.592 (27.75%)
zulu-17.jdk 18452.122 13507.26 (73.2%) 2899.396 (15.71%) 5689.779 (30.84%)
zulu-21.jdk 16542.26 13001.434 (78.6%) 3355.444 (20.28%) 5203.413 (31.46%)
graalvm_21+35.1 16253.952 11060.739 (68.05%) 2933.55 (18.05%) 4512.657 (27.76%)

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

aliyun ecs spec jdk version fastjson2 fastjson1 jackson gson
aliyun_ecs.c8i.large jdk1.8.0_381 1727.933 542.713 (31.41%) 1032.278 (59.74%) 720.339 (41.69%)
jdk-11.0.20 2371.719 536.453 (22.62%) 858.678 (36.2%) 710.935 (29.98%)
jdk-17.0.8 2549.016 588.692 (23.09%) 965.568 (37.88%) 717.76 (28.16%)
jdk-21 2725.022 588.411 (21.59%) 966.507 (35.47%) 729.31 (26.76%)
graalvm_21+35.1 2381.122 778.667 (32.7%) 974.413 (40.92%) 867.993 (36.45%)
aliyun_ecs.g8y.large jdk1.8.0_381 3848.166 895.009 (23.26%) 1205.302 (31.32%) 1004.685 (26.11%)
jdk-11.0.20 3737.854 883.907 (23.65%) 1413.187 (37.81%) 1072.261 (28.69%)
jdk-17.0.8 4033.912 964.796 (23.92%) 1412.786 (35.02%) 1121.65 (27.81%)
jdk-21 3994.758 903.867 (22.63%) 1255.925 (31.44%) 1058.433 (26.5%)
graalvm_21+35.1 4473.366 1115.382 (24.93%) 1330.259 (29.74%) 1336.374 (29.87%)
aws_ecs.c7g.large jdk1.8.0_371 1936.551 787.616 (40.67%) 1345.3 (69.47%) 893.686 (46.15%)
jdk-11.0.19 2647.657 850.014 (32.1%) 1334.712 (50.41%) 970.399 (36.65%)
jdk-17.0.7 4413.817 918.441 (20.81%) 1555.173 (35.23%) 1083.334 (24.54%)
zulu21.0.57 4373.387 830.291 (18.99%) 1449.512 (33.14%) 1097.811 (25.1%)
graalvm_21+35.1 3797.161 1080.624 (28.46%) 1334.879 (35.15%) 1367.616 (36.02%)
orangepi5p jdk1.8.0_381 1354.509 508.976 (37.58%) 883.31 (65.21%) 558.411 (41.23%)
jdk-11.0.20 2396.422 506.612 (21.14%) 840.49 (35.07%) 550.445 (22.97%)
jdk-17.0.8 2337.254 571.537 (24.45%) 910.386 (38.95%) 563.755 (24.12%)
zulu21.32.17 2388.351 508.863 (21.31%) 856.0 (35.84%) 560.64 (23.47%)
graalvm_21+35.1 2530.882 553.315 (21.86%) 756.973 (29.91%) 650.435 (25.7%)
orangepi_aipro jdk1.8.0_381 709.633 150.723 (21.24%) 291.26 (41.04%) 170.996 (24.1%)
jdk-11.0.20 666.26 163.389 (24.52%) 285.808 (42.9%) 184.603 (27.71%)
jdk-17.0.8 904.147 183.617 (20.31%) 310.22 (34.31%) 202.839 (22.43%)
jdk-21 893.846 164.434 (18.4%) 282.577 (31.61%) 191.983 (21.48%)
graalvm_21+35.1 694.112 196.247 (28.27%) 252.79 (36.42%) 212.911 (30.67%)
MacBookM1Pro zulu-8.jdk 12608.552 3410.668 (27.05%) 2991.932 (23.73%) 3974.993 (31.53%)
zulu-11.jdk 8279.875 1854.026 (22.39%) 3127.24 (37.77%) 3310.057 (39.98%)
zulu-17.jdk 15124.382 3219.211 (21.28%) 2489.106 (16.46%) 4344.769 (28.73%)
zulu-21.jdk 14873.274 3344.049 (22.48%) 2793.863 (18.78%) 4148.089 (27.89%)
graalvm_21+35.1 12882.174 3970.899 (30.82%) 4274.177 (33.18%) 4770.977 (37.04%)

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

aliyun ecs spec jdk version jsonb msgpack protobuf
aliyun_ecs.c8i.large jdk1.8.0_381 8448.149 966.545 (11.44%) 3403.513 (40.29%)
jdk-11.0.20 8416.278 1167.661 (13.87%) 2697.545 (32.05%)
jdk-17.0.8 10331.859 1286.782 (12.45%) 3381.719 (32.73%)
jdk-21 10090.464 1274.267 (12.63%) 3932.429 (38.97%)
graalvm_21+35.1 12322.179 1331.614 (10.81%) 7341.665 (59.58%)
aliyun_ecs.g8y.large jdk1.8.0_381 10124.872 1017.722 (10.05%) 3656.993 (36.12%)
jdk-11.0.20 13196.38 1655.934 (12.55%) 4009.141 (30.38%)
jdk-17.0.8 13744.032 1709.154 (12.44%) 5375.49 (39.11%)
jdk-21 10915.097 1625.703 (14.89%) 5003.565 (45.84%)
graalvm_21+35.1 17853.614 1698.611 (9.51%) 10067.382 (56.39%)
aws_ecs.c7g.large jdk1.8.0_371 9755.455 973.335 (9.98%) 3421.715 (35.07%)
jdk-11.0.19 15195.264 1666.247 (10.97%) 3612.405 (23.77%)
jdk-17.0.7 15501.082 1730.622 (11.16%) 5014.06 (32.35%)
zulu21.0.57 14134.996 1705.219 (12.06%) 5103.655 (36.11%)
graalvm_21+35.1 18524.958 1827.927 (9.87%) 12645.585 (68.26%)
orangepi5p jdk1.8.0_381 5564.817 578.275 (10.39%) 2328.677 (41.85%)
jdk-11.0.20 6907.996 896.71 (12.98%) 2192.668 (31.74%)
jdk-17.0.8 7130.914 931.477 (13.06%) 3155.322 (44.25%)
zulu21.32.17 7042.46 863.231 (12.26%) 3138.103 (44.56%)
graalvm_21+35.1 8072.971 905.872 (11.22%) 5105.397 (63.24%)
orangepi_aipro jdk1.8.0_381 2166.645 193.355 (8.92%) 691.892 (31.93%)
jdk-11.0.20 2301.59 257.692 (11.2%) 710.049 (30.85%)
jdk-17.0.8 3078.097 316.947 (10.3%) 959.836 (31.18%)
jdk-21 2985.031 301.154 (10.09%) 943.53 (31.61%)
graalvm_21+35.1 3413.025 280.32 (8.21%) 2011.056 (58.92%)
MacBookM1Pro zulu-8.jdk 27086.553 2493.926 (9.21%) 17227.19 (63.6%)
zulu-11.jdk 26725.078 3356.579 (12.56%) 10202.405 (38.18%)
zulu-17.jdk 36972.484 4080.838 (11.04%) 18573.243 (50.24%)
zulu-21.jdk 22882.715 4585.782 (20.04%) 18795.197 (82.14%)
graalvm_21+35.1 58490.125 4528.233 (7.74%) 37438.619 (64.01%)

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

aliyun ecs spec jdk version jsonb kryo protobuf
aliyun_ecs.c8i.large jdk1.8.0_381 9663.834 3624.969 (37.51%) 3343.575 (34.6%)
jdk-11.0.20 12831.883 3347.067 (26.08%) 3445.938 (26.85%)
jdk-17.0.8 16711.336 4284.088 (25.64%) 3774.453 (22.59%)
jdk-21 14076.117 3248.18 (23.08%) 3442.406 (24.46%)
graalvm_21+35.1 12912.106 5532.777 (42.85%) 7136.167 (55.27%)
aliyun_ecs.g8y.large jdk1.8.0_381 10696.551 5394.782 (50.43%) 4207.973 (39.34%)
jdk-11.0.20 17470.671 6029.783 (34.51%) 5522.794 (31.61%)
jdk-17.0.8 16361.073 6470.073 (39.55%) 5097.499 (31.16%)
jdk-21 19281.998 5181.323 (26.87%) 5170.879 (26.82%)
graalvm_21+35.1 24199.918 7352.619 (30.38%) 10005.791 (41.35%)
aws_ecs.c7g.large jdk1.8.0_371 10182.266 4981.945 (48.93%) 3442.017 (33.8%)
jdk-11.0.19 17241.793 5886.437 (34.14%) 4953.208 (28.73%)
jdk-17.0.7 15557.51 6694.479 (43.03%) 6015.955 (38.67%)
zulu21.0.57 17712.522 6368.675 (35.96%) 4982.456 (28.13%)
graalvm_21+35.1 22372.184 8066.488 (36.06%) 12834.619 (57.37%)
orangepi5p jdk1.8.0_381 6868.995 2590.96 (37.72%) 2413.988 (35.14%)
jdk-11.0.20 8116.559 2855.003 (35.18%) 3117.357 (38.41%)
jdk-17.0.8 9317.343 3198.589 (34.33%) 3260.697 (35%)
zulu21.32.17 8900.997 3148.383 (35.37%) 3114.79 (34.99%)
graalvm_21+35.1 9327.323 3767.0 (40.39%) 5010.404 (53.72%)
orangepi_aipro jdk1.8.0_381 2590.536 1048.621 (40.48%) 703.339 (27.15%)
jdk-11.0.20 2916.943 851.625 (29.2%) 712.23 (24.42%)
jdk-17.0.8 3746.579 1178.098 (31.44%) 948.27 (25.31%)
jdk-21 4089.409 1141.228 (27.91%) 966.252 (23.63%)
graalvm_21+35.1 3899.42 1387.302 (35.58%) 2007.774 (51.49%)
MacBookM1Pro zulu-8.jdk 31330.756 7497.715 (23.93%) 17084.826 (54.53%)
zulu-11.jdk 40573.994 5688.814 (14.02%) 10980.172 (27.06%)
zulu-17.jdk 40392.896 10400.832 (25.75%) 21087.64 (52.21%)
zulu-21.jdk 67934.544 8856.937 (13.04%) 19241.757 (28.32%)
graalvm_21+35.1 42953.659 16792.663 (39.09%) 38154.145 (88.83%)

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

aliyun ecs spec jdk version fastjson2JSONB hessian javaSerialize
aliyun_ecs.c8i.large jdk1.8.0_381 3253.493 854.383 (26.26%) 528.988 (16.26%)
jdk-11.0.20 2829.197 822.08 (29.06%) 492.416 (17.4%)
jdk-17.0.8 3247.912 756.763 (23.3%) 520.604 (16.03%)
jdk-21 3260.913 802.038 (24.6%) 529.009 (16.22%)
graalvm_21+35.1 3207.35 1126.914 (35.14%) 537.333 (16.75%)
aliyun_ecs.g8y.large jdk1.8.0_381 4807.827 1258.446 (26.17%) 859.623 (17.88%)
jdk-11.0.20 4628.506 1072.602 (23.17%) 949.379 (20.51%)
jdk-17.0.8 4494.749 1285.082 (28.59%) 886.412 (19.72%)
jdk-21 4985.413 1250.268 (25.08%) 908.168 (18.22%)
graalvm_21+35.1 5438.665 1272.649 (23.4%) 866.976 (15.94%)
aws_ecs.c7g.large jdk1.8.0_371 4052.313 1224.226 (30.21%) 704.124 (17.38%)
jdk-11.0.19 4300.662 1237.826 (28.78%) 770.113 (17.91%)
jdk-17.0.7 4412.921 1287.049 (29.17%) 743.016 (16.84%)
zulu21.0.57 4408.751 1305.645 (29.61%) 797.402 (18.09%)
graalvm_21+35.1 5683.741 1411.913 (24.84%) 790.923 (13.92%)
orangepi5p jdk1.8.0_381 2780.446 612.272 (22.02%) 475.706 (17.11%)
jdk-11.0.20 2619.987 614.848 (23.47%) 515.928 (19.69%)
jdk-17.0.8 2566.177 616.244 (24.01%) 432.762 (16.86%)
zulu21.32.17 2589.495 629.292 (24.3%) 519.961 (20.08%)
graalvm_21+35.1 3061.856 580.448 (18.96%) 441.621 (14.42%)
orangepi_aipro jdk1.8.0_381 943.607 233.636 (24.76%) 160.193 (16.98%)
jdk-11.0.20 943.553 236.916 (25.11%) 162.479 (17.22%)
jdk-17.0.8 849.06 256.405 (30.2%) 160.065 (18.85%)
jdk-21 870.288 246.506 (28.32%) 152.674 (17.54%)
graalvm_21+35.1 1095.236 289.583 (26.44%) 129.366 (11.81%)
MacBookM1Pro zulu-8.jdk 15938.037 2273.018 (14.26%) 3366.731 (21.12%)
zulu-11.jdk 11107.422 2042.234 (18.39%) 1991.833 (17.93%)
zulu-17.jdk 18661.858 2075.264 (11.12%) 3535.762 (18.95%)
zulu-21.jdk 16501.604 2121.343 (12.86%) 3600.762 (21.82%)
graalvm_21+35.1 20754.996 2627.823 (12.66%) 3551.157 (17.11%)

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

aliyun ecs spec jdk version fastjson2 fastjson1 jackson gson
aliyun_ecs.c8i.large jdk1.8.0_381 4288.713 1566.771 (36.53%) 2073.498 (48.35%) 1002.465 (23.37%)
jdk-11.0.20 4058.551 1432.382 (35.29%) 1733.761 (42.72%) 804.999 (19.83%)
jdk-17.0.8 4288.007 1517.798 (35.4%) 1989.981 (46.41%) 715.914 (16.7%)
jdk-21 4742.145 1513.054 (31.91%) 1838.86 (38.78%) 694.723 (14.65%)
graalvm_21+35.1 6839.556 1742.676 (25.48%) 1947.071 (28.47%) 674.091 (9.86%)
aliyun_ecs.g8y.large jdk1.8.0_381 5601.293 2155.8 (38.49%) 2353.438 (42.02%) 1449.636 (25.88%)
jdk-11.0.20 6435.81 2030.161 (31.54%) 2663.178 (41.38%) 1302.023 (20.23%)
jdk-17.0.8 6270.779 2121.49 (33.83%) 2620.519 (41.79%) 935.315 (14.92%)
jdk-21 6196.502 1952.858 (31.52%) 2668.072 (43.06%) 897.985 (14.49%)
graalvm_21+35.1 8641.954 2900.673 (33.57%) 2633.471 (30.47%) 866.172 (10.02%)
aws_ecs.c7g.large jdk1.8.0_371 5698.166 2192.168 (38.47%) 2302.486 (40.41%) 1451.557 (25.47%)
jdk-11.0.19 6579.451 2603.891 (39.58%) 2540.836 (38.62%) 1285.973 (19.55%)
jdk-17.0.7 7098.457 2363.698 (33.3%) 2744.744 (38.67%) 836.617 (11.79%)
zulu21.0.57 7008.716 1804.015 (25.74%) 2623.402 (37.43%) 807.221 (11.52%)
graalvm_21+35.1 9102.902 2952.107 (32.43%) 2878.475 (31.62%) 799.57 (8.78%)
orangepi5p jdk1.8.0_381 3589.689 1179.778 (32.87%) 1540.302 (42.91%) 809.414 (22.55%)
jdk-11.0.20 3927.695 1133.175 (28.85%) 1548.846 (39.43%) 674.889 (17.18%)
jdk-17.0.8 3935.431 1244.943 (31.63%) 1518.518 (38.59%) 632.435 (16.07%)
zulu21.32.17 4085.367 1210.804 (29.64%) 1222.74 (29.93%) 598.432 (14.65%)
graalvm_21+35.1 4324.884 1364.986 (31.56%) 1477.447 (34.16%) 544.159 (12.58%)
orangepi_aipro jdk1.8.0_381 1286.174 364.975 (28.38%) 443.525 (34.48%) 271.409 (21.1%)
jdk-11.0.20 1424.625 340.386 (23.89%) 412.871 (28.98%) 241.143 (16.93%)
jdk-17.0.8 1516.417 380.295 (25.08%) 464.193 (30.61%) 112.748 (7.44%)
jdk-21 1467.443 400.22 (27.27%) 477.035 (32.51%) 110.041 (7.5%)
graalvm_21+35.1 1636.556 472.09 (28.85%) 403.398 (24.65%) 95.426 (5.83%)
MacBookM1Pro zulu-8.jdk 12200.375 7980.831 (65.41%) 3485.297 (28.57%) 5755.523 (47.17%)
zulu-11.jdk 12643.03 7482.854 (59.19%) 4980.868 (39.4%) 2690.824 (21.28%)
zulu-17.jdk 23620.659 7591.257 (32.14%) 4474.81 (18.94%) 4368.852 (18.5%)
zulu-21.jdk 17894.815 7123.841 (39.81%) 4263.124 (23.82%) 4346.901 (24.29%)
graalvm_21+35.1 23105.575 8173.993 (35.38%) 3880.422 (16.79%) 3337.725 (14.45%)

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

aliyun ecs spec jdk version fastjson2 fastjson1 jackson gson
aliyun_ecs.c8i.large jdk1.8.0_381 3477.769 2005.698 (57.67%) 1948.075 (56.02%) 1083.13 (31.14%)
jdk-11.0.20 2589.882 1746.879 (67.45%) 1751.361 (67.62%) 782.216 (30.2%)
jdk-17.0.8 3305.25 1830.303 (55.38%) 1758.038 (53.19%) 744.34 (22.52%)
jdk-21 3365.946 1886.684 (56.05%) 1616.901 (48.04%) 739.728 (21.98%)
graalvm_21+35.1 3507.418 1676.239 (47.79%) 1836.172 (52.35%) 732.695 (20.89%)
aliyun_ecs.g8y.large jdk1.8.0_381 3857.829 2480.126 (64.29%) 2235.309 (57.94%) 1799.8 (46.65%)
jdk-11.0.20 3924.058 2611.846 (66.56%) 2587.007 (65.93%) 1416.234 (36.09%)
jdk-17.0.8 4672.906 2571.513 (55.03%) 2400.325 (51.37%) 949.969 (20.33%)
jdk-21 4870.129 2584.817 (53.07%) 2512.155 (51.58%) 963.557 (19.79%)
graalvm_21+35.1 5278.149 3146.498 (59.61%) 3036.942 (57.54%) 923.387 (17.49%)
aws_ecs.c7g.large jdk1.8.0_371 3449.701 2183.956 (63.31%) 2115.163 (61.31%) 1470.963 (42.64%)
jdk-11.0.19 4204.094 2540.344 (60.43%) 2314.427 (55.05%) 1553.681 (36.96%)
jdk-17.0.7 4880.641 2552.741 (52.3%) 2529.175 (51.82%) 837.256 (17.15%)
zulu21.0.57 4966.971 2630.268 (52.96%) 2637.307 (53.1%) 871.129 (17.54%)
graalvm_21+35.1 5403.075 3540.851 (65.53%) 3005.373 (55.62%) 857.399 (15.87%)
orangepi5p jdk1.8.0_381 2139.418 1403.114 (65.58%) 1511.46 (70.65%) 852.181 (39.83%)
jdk-11.0.20 2219.93 1400.413 (63.08%) 1417.801 (63.87%) 790.976 (35.63%)
jdk-17.0.8 2316.787 1413.932 (61.03%) 1520.614 (65.63%) 677.296 (29.23%)
zulu21.32.17 2529.626 1366.262 (54.01%) 1468.054 (58.03%) 655.716 (25.92%)
graalvm_21+35.1 2740.309 1603.158 (58.5%) 1631.398 (59.53%) 625.617 (22.83%)
orangepi_aipro jdk1.8.0_381 752.407 430.613 (57.23%) 438.414 (58.27%) 308.537 (41.01%)
jdk-11.0.20 778.483 429.163 (55.13%) 494.472 (63.52%) 256.71 (32.98%)
jdk-17.0.8 967.611 443.099 (45.79%) 553.234 (57.18%) 113.96 (11.78%)
jdk-21 895.987 431.242 (48.13%) 504.633 (56.32%) 118.206 (13.19%)
graalvm_21+35.1 874.597 561.101 (64.16%) 535.459 (61.22%) 113.312 (12.96%)
MacBookM1Pro zulu-8.jdk 12071.585 8419.204 (69.74%) 3517.143 (29.14%) 6375.017 (52.81%)
zulu-11.jdk 6497.496 5712.091 (87.91%) 4840.955 (74.5%) 2774.112 (42.7%)
zulu-17.jdk 11765.205 7273.593 (61.82%) 4484.648 (38.12%) 4472.896 (38.02%)
zulu-21.jdk 10692.709 7982.963 (74.66%) 3856.899 (36.07%) 4389.981 (41.06%)
graalvm_21+35.1 11679.463 9116.302 (78.05%) 4708.766 (40.32%) 3447.532 (29.52%)

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

aliyun ecs spec jdk version fastjson2 fastjson1 jackson gson
aliyun_ecs.c8i.large jdk1.8.0_381 3951.638 1382.332 (34.98%) 1819.783 (46.05%) 966.012 (24.45%)
jdk-11.0.20 4126.969 1283.197 (31.09%) 1691.079 (40.98%) 758.0 (18.37%)
jdk-17.0.8 4944.563 1350.649 (27.32%) 1980.008 (40.04%) 681.803 (13.79%)
jdk-21 5057.67 1408.863 (27.86%) 2146.108 (42.43%) 689.464 (13.63%)
graalvm_21+35.1 5941.67 1559.164 (26.24%) 2424.363 (40.8%) 664.967 (11.19%)
aliyun_ecs.g8y.large jdk1.8.0_381 5912.023 2040.073 (34.51%) 2383.542 (40.32%) 1216.18 (20.57%)
jdk-11.0.20 6492.123 2717.518 (41.86%) 2506.326 (38.61%) 1210.733 (18.65%)
jdk-17.0.8 6728.007 1900.008 (28.24%) 2643.873 (39.3%) 895.984 (13.32%)
jdk-21 6688.604 1963.127 (29.35%) 2579.265 (38.56%) 886.802 (13.26%)
graalvm_21+35.1 8328.477 2139.925 (25.69%) 2807.452 (33.71%) 839.811 (10.08%)
aws_ecs.c7g.large jdk1.8.0_371 6504.354 1885.286 (28.98%) 2439.302 (37.5%) 1162.205 (17.87%)
jdk-11.0.19 7879.701 1813.503 (23.01%) 2442.67 (31%) 1325.226 (16.82%)
jdk-17.0.7 7757.977 2143.118 (27.62%) 2735.641 (35.26%) 775.952 (10%)
zulu21.0.57 7677.045 1931.187 (25.16%) 2585.67 (33.68%) 794.467 (10.35%)
graalvm_21+35.1 9350.265 2228.165 (23.83%) 3006.886 (32.16%) 790.632 (8.46%)
orangepi5p jdk1.8.0_381 4156.432 1153.134 (27.74%) 1509.829 (36.33%) 623.907 (15.01%)
jdk-11.0.20 4254.977 1109.053 (26.06%) 1395.018 (32.79%) 709.286 (16.67%)
jdk-17.0.8 4131.693 1095.859 (26.52%) 1504.837 (36.42%) 647.445 (15.67%)
zulu21.32.17 4211.648 1023.903 (24.31%) 1397.9 (33.19%) 538.348 (12.78%)
graalvm_21+35.1 4785.426 1165.13 (24.35%) 1544.504 (32.28%) 540.976 (11.3%)
orangepi_aipro jdk1.8.0_381 1248.829 310.25 (24.84%) 438.431 (35.11%) 238.233 (19.08%)
jdk-11.0.20 1282.924 312.687 (24.37%) 422.173 (32.91%) 217.482 (16.95%)
jdk-17.0.8 1579.239 333.782 (21.14%) 486.37 (30.8%) 111.817 (7.08%)
jdk-21 1589.148 337.029 (21.21%) 480.574 (30.24%) 109.221 (6.87%)
graalvm_21+35.1 1586.619 445.596 (28.08%) 453.766 (28.6%) 103.314 (6.51%)
MacBookM1Pro zulu-8.jdk 12179.922 7575.101 (62.19%) 3231.392 (26.53%) 4982.273 (40.91%)
zulu-11.jdk 15503.966 4421.528 (28.52%) 5116.324 (33%) 2708.676 (17.47%)
zulu-17.jdk 21096.827 6532.764 (30.97%) 4319.77 (20.48%) 4436.341 (21.03%)
zulu-21.jdk 21014.16 6894.503 (32.81%) 4453.849 (21.19%) 4204.607 (20.01%)
graalvm_21+35.1 24487.932 8392.622 (34.27%) 4417.049 (18.04%) 3339.369 (13.64%)

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

aliyun ecs spec jdk version fastjson2 jackson
aliyun_ecs.c8i.large jdk1.8.0_381 3629.859 1833.03 (50.5%)
jdk-11.0.20 3176.59 1550.116 (48.8%)
jdk-17.0.8 3833.752 1654.422 (43.15%)
jdk-21 3831.192 1827.737 (47.71%)
graalvm_21+35.1 4198.647 2206.611 (52.56%)
aliyun_ecs.g8y.large jdk1.8.0_381 4690.186 2507.413 (53.46%)
jdk-11.0.20 4713.922 2056.32 (43.62%)
jdk-17.0.8 5051.455 2596.943 (51.41%)
jdk-21 4412.359 2745.372 (62.22%)
graalvm_21+35.1 5932.003 3525.69 (59.44%)
aws_ecs.c7g.large jdk1.8.0_371 4717.229 2489.504 (52.77%)
jdk-11.0.19 4476.141 2180.26 (48.71%)
jdk-17.0.7 5223.371 2672.151 (51.16%)
zulu21.0.57 5971.336 2770.918 (46.4%)
graalvm_21+35.1 7132.712 3804.292 (53.34%)
orangepi5p jdk1.8.0_381 2601.415 1526.703 (58.69%)
jdk-11.0.20 2684.956 1379.556 (51.38%)
jdk-17.0.8 2634.066 1542.428 (58.56%)
zulu21.32.17 2714.153 1537.592 (56.65%)
graalvm_21+35.1 2986.687 1681.789 (56.31%)
orangepi_aipro jdk1.8.0_381 840.373 512.541 (60.99%)
jdk-11.0.20 940.022 482.655 (51.35%)
jdk-17.0.8 920.286 549.551 (59.72%)
jdk-21 993.598 549.511 (55.31%)
graalvm_21+35.1 984.809 631.769 (64.15%)
MacBookM1Pro zulu-8.jdk 12000.666 3548.532 (29.57%)
zulu-11.jdk 8906.254 4785.689 (53.73%)
zulu-17.jdk 14290.354 3673.22 (25.7%)
zulu-21.jdk 14301.352 3887.336 (27.18%)
graalvm_21+35.1 14834.612 4613.631 (31.1%)