这个场景是JSONB格式和Fury CompatibleMode反序列化性能比较。基于KeyValue的映射,对增加和删除字段的序列化结构都能有很好的兼容性。
aliyun ecs spec | jdk version | jsonb | fury |
---|---|---|---|
aliyun_ecs.c8a.large | jdk1.8.0_381 | 7362.476 | 5573.454 (75.7%) |
jdk-11.0.20 | 8116.649 | 6669.485 (82.17%) | |
jdk-17.0.8 | 8583.935 | 7164.26 (83.46%) | |
jdk-21.0.2 | 8773.838 | 7325.049 (83.49%) | |
aliyun_ecs.c8i.large | jdk1.8.0_381 | 6411.129 | 3933.978 (61.36%) |
jdk-11.0.20 | 6303.41 | 3923.715 (62.25%) | |
jdk-17.0.8 | 7077.495 | 4217.839 (59.6%) | |
jdk-21.0.2 | 7537.574 | 4422.852 (58.68%) | |
graalvm_21+35.1 | 8825.448 | 5106.524 (57.86%) | |
aliyun_ecs.c8y.large | jdk1.8.0_381 | 7912.216 | 7172.333 (90.65%) |
jdk-11.0.20 | 8584.327 | 6742.16 (78.54%) | |
jdk-17.0.8 | 9493.432 | 6921.613 (72.91%) | |
jdk-21.0.2 | 9302.376 | 7422.175 (79.79%) | |
graalvm_21+35.1 | 11280.573 | 8324.447 (73.79%) |
这个场景是JSONB格式和Fury CompatibleMode序列化性能比较。基于KeyValue的映射,对增加和删除字段的序列化结构都能有很好的兼容性。
aliyun ecs spec | jdk version | jsonb | fury |
---|---|---|---|
aliyun_ecs.c8a.large | jdk1.8.0_381 | 6476.378 | 6197.591 (95.7%) |
jdk-11.0.20 | 7001.457 | 6151.085 (87.85%) | |
jdk-17.0.8 | 8172.959 | 7400.699 (90.55%) | |
jdk-21.0.2 | 8292.222 | 7079.804 (85.38%) | |
aliyun_ecs.c8i.large | jdk1.8.0_381 | 4546.203 | 3920.802 (86.24%) |
jdk-11.0.20 | 4418.367 | 3999.063 (90.51%) | |
jdk-17.0.8 | 4292.057 | 4869.554 (113.46%) | |
jdk-21.0.2 | 5172.866 | 4192.646 (81.05%) | |
graalvm_21+35.1 | 6227.203 | 4202.971 (67.49%) | |
aliyun_ecs.c8y.large | jdk1.8.0_381 | 6959.747 | 6612.734 (95.01%) |
jdk-11.0.20 | 7787.731 | 6764.044 (86.86%) | |
jdk-17.0.8 | 7635.17 | 6836.71 (89.54%) | |
jdk-21.0.2 | 8233.43 | 6018.228 (73.1%) | |
graalvm_21+35.1 | 10005.064 | 6154.037 (61.51%) |
这个场景是二进制反序列化比较,JSONB格式、JSON UTF8编码(fastjson2UTF8Bytes)、hessian、javaSerialize的比较,用于Apache dubbo的用户选择二进制协议比较
aliyun ecs spec | jdk version | jsonb | fastjson2UTF8Bytes | hessian | javaSerialize |
---|---|---|---|---|---|
aliyun_ecs.c8a.large | jdk1.8.0_381 | 8368.822 | 4423.505 (52.86%) | 838.533 (10.02%) | 144.412 (1.73%) |
jdk-11.0.20 | 9388.647 | 4869.396 (51.86%) | 777.585 (8.28%) | 152.67 (1.63%) | |
jdk-17.0.8 | 10348.858 | 5100.895 (49.29%) | 778.812 (7.53%) | 167.902 (1.62%) | |
jdk-21.0.2 | 10282.685 | 5262.424 (51.18%) | 802.646 (7.81%) | 153.244 (1.49%) | |
aliyun_ecs.c8i.large | jdk1.8.0_381 | 7520.642 | 3494.026 (46.46%) | 671.441 (8.93%) | 112.816 (1.5%) |
jdk-11.0.20 | 7313.457 | 3516.879 (48.09%) | 627.245 (8.58%) | 114.746 (1.57%) | |
jdk-17.0.8 | 8939.133 | 3889.537 (43.51%) | 627.603 (7.02%) | 128.881 (1.44%) | |
jdk-21.0.2 | 9299.26 | 3940.112 (42.37%) | 678.949 (7.3%) | 124.977 (1.34%) | |
graalvm_21+35.1 | 9914.726 | 4134.858 (41.7%) | 801.001 (8.08%) | 122.548 (1.24%) | |
aliyun_ecs.c8y.large | jdk1.8.0_381 | 8941.397 | 5315.798 (59.45%) | 371.49 (4.15%) | 179.992 (2.01%) |
jdk-11.0.20 | 9309.87 | 5589.358 (60.04%) | 421.767 (4.53%) | 174.749 (1.88%) | |
jdk-17.0.8 | 10040.161 | 5539.031 (55.17%) | 414.473 (4.13%) | 170.541 (1.7%) | |
jdk-21.0.2 | 10091.787 | 5454.862 (54.05%) | 489.914 (4.85%) | 176.92 (1.75%) | |
graalvm_21+35.1 | 12281.414 | 5933.002 (48.31%) | 684.352 (5.57%) | 178.66 (1.45%) |
这个场景是二进制反序列化比较,JSONB格式(基于字段顺序映射)、kryo、protobuf的比较
aliyun ecs spec | jdk version | jsonb | kryo | protobuf |
---|---|---|---|---|
aliyun_ecs.c8a.large | jdk1.8.0_381 | 10703.936 | 4698.773 (43.9%) | 3981.339 (37.2%) |
jdk-11.0.20 | 12604.044 | 4561.522 (36.19%) | 4471.276 (35.47%) | |
jdk-17.0.8 | 13851.94 | 4499.917 (32.49%) | 5903.813 (42.62%) | |
jdk-21.0.2 | 13476.356 | 4585.56 (34.03%) | 5921.166 (43.94%) | |
aliyun_ecs.c8i.large | jdk1.8.0_381 | 10199.763 | 3347.64 (32.82%) | 3164.429 (31.02%) |
jdk-11.0.20 | 9934.802 | 3393.87 (34.16%) | 2846.877 (28.66%) | |
jdk-17.0.8 | 13480.1 | 3211.863 (23.83%) | 3752.016 (27.83%) | |
jdk-21.0.2 | 13020.943 | 3569.105 (27.41%) | 3659.429 (28.1%) | |
graalvm_21+35.1 | 17166.782 | 3918.99 (22.83%) | 5403.772 (31.48%) | |
aliyun_ecs.c8y.large | jdk1.8.0_381 | 11625.676 | 4769.184 (41.02%) | 3838.382 (33.02%) |
jdk-11.0.20 | 11125.867 | 5769.948 (51.86%) | 3940.216 (35.41%) | |
jdk-17.0.8 | 12238.985 | 5945.738 (48.58%) | 4710.357 (38.49%) | |
jdk-21.0.2 | 12441.946 | 5515.556 (44.33%) | 5037.745 (40.49%) | |
graalvm_21+35.1 | 21242.683 | 5222.607 (24.59%) | 7605.491 (35.8%) |
这个场景是带类型信息二进制反序列化比较,JSONB格式、JSON UTF8编码(fastjson2UTF8Bytes)、hessian、javaSerialize的比较,用于Apache dubbo的用户选择二进制协议比较
aliyun ecs spec | jdk version | fastjson2JSONB | hessian | javaSerialize |
---|---|---|---|---|
aliyun_ecs.c8a.large | jdk1.8.0_381 | 5038.214 | 865.862 (17.19%) | 144.965 (2.88%) |
jdk-11.0.20 | 4923.747 | 770.387 (15.65%) | 145.118 (2.95%) | |
jdk-17.0.8 | 5825.125 | 809.16 (13.89%) | 167.322 (2.87%) | |
jdk-21.0.2 | 5754.128 | 809.789 (14.07%) | 153.742 (2.67%) | |
aliyun_ecs.c8i.large | jdk1.8.0_381 | 4360.669 | 664.032 (15.23%) | 114.065 (2.62%) |
jdk-11.0.20 | 4254.165 | 625.105 (14.69%) | 113.778 (2.67%) | |
jdk-17.0.8 | 4730.133 | 656.116 (13.87%) | 128.182 (2.71%) | |
jdk-21.0.2 | 4784.683 | 684.556 (14.31%) | 124.671 (2.61%) | |
graalvm_21+35.1 | 5395.139 | 860.982 (15.96%) | 128.002 (2.37%) | |
aliyun_ecs.c8y.large | jdk1.8.0_381 | 5614.084 | 399.413 (7.11%) | 179.271 (3.19%) |
jdk-11.0.20 | 2780.438 | 475.177 (17.09%) | 167.821 (6.04%) | |
jdk-17.0.8 | 6243.021 | 404.961 (6.49%) | 172.962 (2.77%) | |
jdk-21.0.2 | 6034.652 | 564.528 (9.35%) | 179.514 (2.97%) | |
graalvm_21+35.1 | 7276.946 | 743.648 (10.22%) | 179.842 (2.47%) |
这个场景是将没有格式化的JSON字符串反序列化为JavaBean对象,是最常用的场景,这个是fastjson1的强项。
aliyun ecs spec | jdk version | fastjson2 | fastjson1 | jackson | gson |
---|---|---|---|---|---|
aliyun_ecs.c8a.large | jdk1.8.0_381 | 4325.51 | 3234.663 (74.78%) | 1446.789 (33.45%) | 1303.781 (30.14%) |
jdk-11.0.20 | 4842.006 | 2811.713 (58.07%) | 1353.053 (27.94%) | 1329.69 (27.46%) | |
jdk-17.0.8 | 5069.906 | 4049.875 (79.88%) | 1444.006 (28.48%) | 1355.3 (26.73%) | |
jdk-21.0.2 | 5279.801 | 3796.647 (71.91%) | 1341.899 (25.42%) | 1229.955 (23.3%) | |
aliyun_ecs.c8i.large | jdk1.8.0_381 | 3192.818 | 2199.511 (68.89%) | 1026.4 (32.15%) | 989.975 (31.01%) |
jdk-11.0.20 | 3515.317 | 1953.133 (55.56%) | 979.236 (27.86%) | 963.342 (27.4%) | |
jdk-17.0.8 | 3793.149 | 2579.187 (68%) | 964.943 (25.44%) | 917.957 (24.2%) | |
jdk-21.0.2 | 3842.258 | 2619.447 (68.17%) | 972.11 (25.3%) | 923.561 (24.04%) | |
graalvm_21+35.1 | 3911.585 | 3626.257 (92.71%) | 1077.906 (27.56%) | 1026.775 (26.25%) | |
aliyun_ecs.c8y.large | jdk1.8.0_381 | 5193.746 | 3369.906 (64.88%) | 1474.771 (28.4%) | 1562.467 (30.08%) |
jdk-11.0.20 | 5671.485 | 3281.483 (57.86%) | 1389.277 (24.5%) | 1495.173 (26.36%) | |
jdk-17.0.8 | 5695.815 | 4374.742 (76.81%) | 1475.76 (25.91%) | 1528.884 (26.84%) | |
jdk-21.0.2 | 5596.734 | 4407.789 (78.76%) | 1396.419 (24.95%) | 1378.897 (24.64%) | |
graalvm_21+35.1 | 6062.05 | 5042.226 (83.18%) | 1473.758 (24.31%) | 1380.095 (22.77%) |
这个场景是将格式化过的JSON字符串反序列化为JavaBean对象
aliyun ecs spec | jdk version | fastjson2 | fastjson1 | jackson | gson |
---|---|---|---|---|---|
aliyun_ecs.c8a.large | jdk1.8.0_381 | 2921.474 | 893.923 (30.6%) | 1347.343 (46.12%) | 1219.417 (41.74%) |
jdk-11.0.20 | 2835.815 | 764.332 (26.95%) | 1270.213 (44.79%) | 1248.898 (44.04%) | |
jdk-17.0.8 | 3702.275 | 948.841 (25.63%) | 1296.266 (35.01%) | 1308.077 (35.33%) | |
jdk-21.0.2 | 3934.589 | 904.776 (23%) | 1269.19 (32.26%) | 1178.483 (29.95%) | |
aliyun_ecs.c8i.large | jdk1.8.0_381 | 2124.69 | 587.133 (27.63%) | 975.876 (45.93%) | 898.474 (42.29%) |
jdk-11.0.20 | 2106.438 | 574.649 (27.28%) | 899.485 (42.7%) | 889.41 (42.22%) | |
jdk-17.0.8 | 2539.157 | 627.557 (24.72%) | 895.696 (35.28%) | 927.149 (36.51%) | |
jdk-21.0.2 | 2660.933 | 632.427 (23.77%) | 920.511 (34.59%) | 890.455 (33.46%) | |
graalvm_21+35.1 | 2408.319 | 881.721 (36.61%) | 956.865 (39.73%) | 945.782 (39.27%) | |
aliyun_ecs.c8y.large | jdk1.8.0_381 | 1923.824 | 955.791 (49.68%) | 1360.556 (70.72%) | 1418.923 (73.76%) |
jdk-11.0.20 | 4187.211 | 990.382 (23.65%) | 1352.962 (32.31%) | 1405.211 (33.56%) | |
jdk-17.0.8 | 4121.924 | 1099.114 (26.67%) | 1371.494 (33.27%) | 1379.566 (33.47%) | |
jdk-21.0.2 | 4094.297 | 1001.451 (24.46%) | 1327.264 (32.42%) | 1243.314 (30.37%) | |
graalvm_21+35.1 | 4425.865 | 1379.193 (31.16%) | 1368.558 (30.92%) | 1309.296 (29.58%) |
这个场景是将没有格式化的JSON字符串解析为JSONObject或者HashMap,不涉及绑定JavaBean对象。
aliyun ecs spec | jdk version | fastjson2 | fastjson1 | jackson | gson |
---|---|---|---|---|---|
aliyun_ecs.c8a.large | jdk1.8.0_381 | 2687.806 | 1556.311 (57.9%) | 1505.656 (56.02%) | 1136.2 (42.27%) |
jdk-11.0.20 | 2270.188 | 1160.947 (51.14%) | 1362.856 (60.03%) | 1117.136 (49.21%) | |
jdk-17.0.8 | 2781.905 | 1554.543 (55.88%) | 1581.79 (56.86%) | 1161.59 (41.76%) | |
jdk-21.0.2 | 2821.885 | 1448.236 (51.32%) | 1578.271 (55.93%) | 1123.614 (39.82%) | |
aliyun_ecs.c8i.large | jdk1.8.0_381 | 1952.001 | 1138.311 (58.32%) | 1178.707 (60.38%) | 825.917 (42.31%) |
jdk-11.0.20 | 1796.483 | 1020.569 (56.81%) | 930.95 (51.82%) | 810.249 (45.1%) | |
jdk-17.0.8 | 2291.86 | 1268.298 (55.34%) | 1117.128 (48.74%) | 793.963 (34.64%) | |
jdk-21.0.2 | 2374.445 | 1193.931 (50.28%) | 1132.328 (47.69%) | 766.479 (32.28%) | |
graalvm_21+35.1 | 2222.76 | 1514.417 (68.13%) | 1147.897 (51.64%) | 957.097 (43.06%) | |
aliyun_ecs.c8y.large | jdk1.8.0_381 | 2755.432 | 1257.944 (45.65%) | 1343.066 (48.74%) | 1246.832 (45.25%) |
jdk-11.0.20 | 3104.218 | 1499.793 (48.31%) | 1313.741 (42.32%) | 1183.955 (38.14%) | |
jdk-17.0.8 | 3051.016 | 1573.012 (51.56%) | 1396.566 (45.77%) | 1219.841 (39.98%) | |
jdk-21.0.2 | 3126.853 | 1480.904 (47.36%) | 1341.276 (42.9%) | 1161.224 (37.14%) | |
graalvm_21+35.1 | 3236.006 | 2253.502 (69.64%) | 1674.497 (51.75%) | 1448.39 (44.76%) |
这个场景是将格式化过的字符串解析为JSONObject或者HashMap,不涉及绑定JavaBean对象。
aliyun ecs spec | jdk version | fastjson2 | fastjson1 | jackson | gson |
---|---|---|---|---|---|
aliyun_ecs.c8a.large | jdk1.8.0_381 | 2293.14 | 1362.152 (59.4%) | 1419.876 (61.92%) | 1089.682 (47.52%) |
jdk-11.0.20 | 2020.493 | 998.965 (49.44%) | 1269.299 (62.82%) | 1070.433 (52.98%) | |
jdk-17.0.8 | 2308.086 | 1364.165 (59.1%) | 1466.844 (63.55%) | 1077.877 (46.7%) | |
jdk-21.0.2 | 2303.214 | 1292.235 (56.11%) | 1498.931 (65.08%) | 1068.46 (46.39%) | |
aliyun_ecs.c8i.large | jdk1.8.0_381 | 1453.169 | 968.076 (66.62%) | 1073.744 (73.89%) | 792.516 (54.54%) |
jdk-11.0.20 | 1505.201 | 858.963 (57.07%) | 896.3 (59.55%) | 727.291 (48.32%) | |
jdk-17.0.8 | 1725.632 | 1080.616 (62.62%) | 982.125 (56.91%) | 741.531 (42.97%) | |
jdk-21.0.2 | 1835.449 | 1020.474 (55.6%) | 994.3 (54.17%) | 745.77 (40.63%) | |
graalvm_21+35.1 | 1539.652 | 1304.474 (84.73%) | 1080.056 (70.15%) | 874.078 (56.77%) | |
aliyun_ecs.c8y.large | jdk1.8.0_381 | 2393.592 | 1183.532 (49.45%) | 1203.009 (50.26%) | 1180.195 (49.31%) |
jdk-11.0.20 | 2621.148 | 1322.345 (50.45%) | 1253.633 (47.83%) | 1129.879 (43.11%) | |
jdk-17.0.8 | 2576.676 | 1432.526 (55.6%) | 1289.647 (50.05%) | 1160.113 (45.02%) | |
jdk-21.0.2 | 2513.229 | 1307.232 (52.01%) | 1326.981 (52.8%) | 1049.158 (41.75%) | |
graalvm_21+35.1 | 2699.262 | 1975.665 (73.19%) | 1528.98 (56.64%) | 1269.002 (47.01%) |
这个场景是将没有格式化的JSON字符串UTF8编码的byte[]数组反序列化解析为JSONObject或者HashMap,不涉及绑定JavaBean对象。
aliyun ecs spec | jdk version | fastjson2 | fastjson1 | jackson | gson |
---|---|---|---|---|---|
aliyun_ecs.c8a.large | jdk1.8.0_381 | 2584.695 | 1338.472 (51.78%) | 1845.494 (71.4%) | 1028.391 (39.79%) |
jdk-11.0.20 | 2316.008 | 1029.204 (44.44%) | 1544.732 (66.7%) | 1114.422 (48.12%) | |
jdk-17.0.8 | 2798.647 | 1349.177 (48.21%) | 1678.152 (59.96%) | 1135.839 (40.59%) | |
jdk-21.0.2 | 2902.293 | 1312.974 (45.24%) | 1704.114 (58.72%) | 1077.456 (37.12%) | |
aliyun_ecs.c8i.large | jdk1.8.0_381 | 2125.341 | 1046.688 (49.25%) | 1252.666 (58.94%) | 796.302 (37.47%) |
jdk-11.0.20 | 1864.528 | 910.33 (48.82%) | 1169.197 (62.71%) | 787.183 (42.22%) | |
jdk-17.0.8 | 2363.126 | 1105.44 (46.78%) | 1179.326 (49.91%) | 769.044 (32.54%) | |
jdk-21.0.2 | 2456.221 | 1048.789 (42.7%) | 1202.165 (48.94%) | 768.39 (31.28%) | |
graalvm_21+35.1 | 2248.924 | 1374.247 (61.11%) | 1314.45 (58.45%) | 939.452 (41.77%) | |
aliyun_ecs.c8y.large | jdk1.8.0_381 | 2832.39 | 1295.969 (45.76%) | 1380.082 (48.72%) | 1127.722 (39.82%) |
jdk-11.0.20 | 3099.513 | 1333.477 (43.02%) | 1489.807 (48.07%) | 1125.425 (36.31%) | |
jdk-17.0.8 | 2984.846 | 1436.885 (48.14%) | 1592.408 (53.35%) | 1173.097 (39.3%) | |
jdk-21.0.2 | 2991.274 | 1315.668 (43.98%) | 1553.179 (51.92%) | 1128.229 (37.72%) | |
graalvm_21+35.1 | 3422.15 | 1873.114 (54.74%) | 1711.812 (50.02%) | 1341.227 (39.19%) |
这个场景是将格式化过的字符串UTF8编码的byte[]数组反序列化解析为JSONObject或者HashMap,不涉及绑定JavaBean对象。
aliyun ecs spec | jdk version | fastjson2 | fastjson1 | jackson | gson |
---|---|---|---|---|---|
aliyun_ecs.c8a.large | jdk1.8.0_381 | 2111.633 | 1150.475 (54.48%) | 1535.595 (72.72%) | 955.771 (45.26%) |
jdk-11.0.20 | 2059.891 | 877.284 (42.59%) | 1466.998 (71.22%) | 1027.245 (49.87%) | |
jdk-17.0.8 | 2354.983 | 1157.977 (49.17%) | 1591.031 (67.56%) | 1043.364 (44.3%) | |
jdk-21.0.2 | 2345.424 | 1164.341 (49.64%) | 1550.936 (66.13%) | 1032.144 (44.01%) | |
aliyun_ecs.c8i.large | jdk1.8.0_381 | 1503.728 | 882.762 (58.7%) | 1104.902 (73.48%) | 707.255 (47.03%) |
jdk-11.0.20 | 1467.223 | 797.422 (54.35%) | 1013.93 (69.11%) | 723.484 (49.31%) | |
jdk-17.0.8 | 1777.162 | 933.011 (52.5%) | 1070.829 (60.26%) | 721.924 (40.62%) | |
jdk-21.0.2 | 1830.378 | 888.346 (48.53%) | 1094.449 (59.79%) | 734.77 (40.14%) | |
graalvm_21+35.1 | 1552.25 | 1040.887 (67.06%) | 1094.136 (70.49%) | 846.364 (54.52%) | |
aliyun_ecs.c8y.large | jdk1.8.0_381 | 2430.867 | 1094.794 (45.04%) | 1268.611 (52.19%) | 1064.074 (43.77%) |
jdk-11.0.20 | 2582.449 | 1131.717 (43.82%) | 1402.263 (54.3%) | 1093.394 (42.34%) | |
jdk-17.0.8 | 2514.636 | 1227.35 (48.81%) | 1489.415 (59.23%) | 1123.683 (44.69%) | |
jdk-21.0.2 | 2475.164 | 1166.413 (47.12%) | 1469.939 (59.39%) | 1031.411 (41.67%) | |
graalvm_21+35.1 | 2819.965 | 1489.161 (52.81%) | 1524.289 (54.05%) | 1330.655 (47.19%) |
这个场景是将没有格式化的JSON字符串UTF8编码的byte[]数组反序列化为JavaBean对象,是最常用的场景,这个是fastjson1的强项。
aliyun ecs spec | jdk version | fastjson2 | fastjson1 | jackson | gson |
---|---|---|---|---|---|
aliyun_ecs.c8a.large | jdk1.8.0_381 | 3147.525 | 2523.418 (80.17%) | 1659.986 (52.74%) | 1161.565 (36.9%) |
jdk-11.0.20 | 3618.094 | 2228.472 (61.59%) | 1532.069 (42.34%) | 1305.032 (36.07%) | |
jdk-17.0.8 | 5237.092 | 2796.117 (53.39%) | 1581.509 (30.2%) | 1371.843 (26.19%) | |
jdk-21.0.2 | 5283.21 | 2729.409 (51.66%) | 1525.245 (28.87%) | 1156.48 (21.89%) | |
aliyun_ecs.c8i.large | jdk1.8.0_381 | 3472.499 | 1887.659 (54.36%) | 1168.527 (33.65%) | 944.235 (27.19%) |
jdk-11.0.20 | 1959.456 | 1681.015 (85.79%) | 1061.744 (54.19%) | 965.983 (49.3%) | |
jdk-17.0.8 | 3867.207 | 1953.027 (50.5%) | 1094.044 (28.29%) | 991.5 (25.64%) | |
jdk-21.0.2 | 3947.632 | 2143.097 (54.29%) | 1101.204 (27.9%) | 912.186 (23.11%) | |
graalvm_21+35.1 | 4229.0 | 2614.983 (61.83%) | 1130.589 (26.73%) | 1020.29 (24.13%) | |
aliyun_ecs.c8y.large | jdk1.8.0_381 | 2002.317 | 2825.912 (141.13%) | 1689.712 (84.39%) | 1425.643 (71.2%) |
jdk-11.0.20 | 2174.702 | 2654.124 (122.05%) | 1556.213 (71.56%) | 1403.846 (64.55%) | |
jdk-17.0.8 | 5520.993 | 3517.895 (63.72%) | 1678.727 (30.41%) | 1525.43 (27.63%) | |
jdk-21.0.2 | 5753.452 | 3482.648 (60.53%) | 1577.317 (27.42%) | 1379.962 (23.98%) | |
graalvm_21+35.1 | 5877.27 | 3417.528 (58.15%) | 1501.348 (25.54%) | 1328.557 (22.61%) |
这个场景是将格式化过的JSON字符串UTF8编码的byte[]数组反序列化为JavaBean对象
aliyun ecs spec | jdk version | fastjson2 | fastjson1 | jackson | gson |
---|---|---|---|---|---|
aliyun_ecs.c8a.large | jdk1.8.0_381 | 3342.615 | 800.341 (23.94%) | 1542.776 (46.15%) | 943.954 (28.24%) |
jdk-11.0.20 | 3314.678 | 695.151 (20.97%) | 1391.666 (41.98%) | 1025.432 (30.94%) | |
jdk-17.0.8 | 3788.472 | 829.839 (21.9%) | 1494.852 (39.46%) | 1045.077 (27.59%) | |
jdk-21.0.2 | 4048.687 | 808.573 (19.97%) | 1372.314 (33.9%) | 1024.125 (25.3%) | |
aliyun_ecs.c8i.large | jdk1.8.0_381 | 1757.338 | 549.55 (31.27%) | 1056.915 (60.14%) | 741.902 (42.22%) |
jdk-11.0.20 | 2372.535 | 536.612 (22.62%) | 997.709 (42.05%) | 708.764 (29.87%) | |
jdk-17.0.8 | 2502.897 | 574.342 (22.95%) | 992.852 (39.67%) | 720.066 (28.77%) | |
jdk-21.0.2 | 2729.453 | 590.181 (21.62%) | 977.341 (35.81%) | 711.285 (26.06%) | |
graalvm_21+35.1 | 2404.522 | 806.339 (33.53%) | 1000.847 (41.62%) | 901.649 (37.5%) | |
aliyun_ecs.c8y.large | jdk1.8.0_381 | 3987.535 | 914.801 (22.94%) | 1548.571 (38.84%) | 990.915 (24.85%) |
jdk-11.0.20 | 4114.179 | 895.035 (21.75%) | 1462.884 (35.56%) | 1085.304 (26.38%) | |
jdk-17.0.8 | 4160.973 | 984.584 (23.66%) | 1456.397 (35%) | 1098.999 (26.41%) | |
jdk-21.0.2 | 4126.588 | 926.772 (22.46%) | 1470.21 (35.63%) | 1074.07 (26.03%) | |
graalvm_21+35.1 | 4505.277 | 1155.94 (25.66%) | 1339.23 (29.73%) | 1350.098 (29.97%) |
这个场景是二进制序列化比较,JSONB格式、JSON UTF8编码(fastjson2UTF8Bytes)、hessian、javaSerialize的比较,用于Apache dubbo的用户选择二进制协议比较
aliyun ecs spec | jdk version | jsonb | msgpack | protobuf |
---|---|---|---|---|
aliyun_ecs.c8a.large | jdk1.8.0_381 | 9673.885 | 1119.75 (11.57%) | 4494.908 (46.46%) |
jdk-11.0.20 | 11697.632 | 1545.053 (13.21%) | 4159.996 (35.56%) | |
jdk-17.0.8 | 15095.083 | 1699.602 (11.26%) | 5786.625 (38.33%) | |
jdk-21.0.2 | 15008.899 | 1571.821 (10.47%) | 6039.433 (40.24%) | |
aliyun_ecs.c8i.large | jdk1.8.0_381 | 8660.254 | 992.612 (11.46%) | 3437.071 (39.69%) |
jdk-11.0.20 | 8319.371 | 1245.868 (14.98%) | 2909.669 (34.97%) | |
jdk-17.0.8 | 10782.993 | 1406.229 (13.04%) | 3362.476 (31.18%) | |
jdk-21.0.2 | 9860.437 | 1306.788 (13.25%) | 3361.174 (34.09%) | |
graalvm_21+35.1 | 12147.787 | 1405.701 (11.57%) | 7162.217 (58.96%) | |
aliyun_ecs.c8y.large | jdk1.8.0_381 | 10225.443 | 1289.487 (12.61%) | 3952.013 (38.65%) |
jdk-11.0.20 | 12177.715 | 1790.513 (14.7%) | 4000.052 (32.85%) | |
jdk-17.0.8 | 14282.461 | 1885.547 (13.2%) | 5251.565 (36.77%) | |
jdk-21.0.2 | 11902.348 | 1831.382 (15.39%) | 5330.129 (44.78%) | |
graalvm_21+35.1 | 17657.235 | 1782.629 (10.1%) | 9657.414 (54.69%) |
这个场景是二进制序列化比较,JSONB格式(基于字段顺序映射)、kryo、protobuf的比较
aliyun ecs spec | jdk version | jsonb | kryo | protobuf |
---|---|---|---|---|
aliyun_ecs.c8a.large | jdk1.8.0_381 | 11947.932 | 5192.163 (43.46%) | 5019.273 (42.01%) |
jdk-11.0.20 | 17942.223 | 5176.296 (28.85%) | 5239.336 (29.2%) | |
jdk-17.0.8 | 20449.931 | 5490.58 (26.85%) | 5589.868 (27.33%) | |
jdk-21.0.2 | 19768.851 | 5466.33 (27.65%) | 6057.56 (30.64%) | |
aliyun_ecs.c8i.large | jdk1.8.0_381 | 9917.752 | 3873.118 (39.05%) | 3143.725 (31.7%) |
jdk-11.0.20 | 13810.635 | 3490.666 (25.28%) | 3535.338 (25.6%) | |
jdk-17.0.8 | 14615.995 | 4317.643 (29.54%) | 3580.267 (24.5%) | |
jdk-21.0.2 | 17514.858 | 4217.713 (24.08%) | 3454.125 (19.72%) | |
graalvm_21+35.1 | 13361.585 | 5571.318 (41.7%) | 7284.551 (54.52%) | |
aliyun_ecs.c8y.large | jdk1.8.0_381 | 9516.714 | 5500.538 (57.8%) | 3964.3 (41.66%) |
jdk-11.0.20 | 17480.241 | 5266.982 (30.13%) | 5787.151 (33.11%) | |
jdk-17.0.8 | 14545.204 | 6518.122 (44.81%) | 4949.618 (34.03%) | |
jdk-21.0.2 | 19457.999 | 6401.859 (32.9%) | 5335.708 (27.42%) | |
graalvm_21+35.1 | 25982.335 | 7398.107 (28.47%) | 10375.057 (39.93%) |
这个场景是带类型信息二进制序列化比较,JSONB格式、JSON UTF8编码(fastjson2UTF8Bytes)、hessian、javaSerialize的比较,用于Apache dubbo的用户选择二进制协议比较
aliyun ecs spec | jdk version | fastjson2JSONB | hessian | javaSerialize |
---|---|---|---|---|
aliyun_ecs.c8a.large | jdk1.8.0_381 | 3595.255 | 1356.384 (37.73%) | 774.067 (21.53%) |
jdk-11.0.20 | 3740.454 | 1255.222 (33.56%) | 759.94 (20.32%) | |
jdk-17.0.8 | 4719.779 | 1229.321 (26.05%) | 786.746 (16.67%) | |
jdk-21.0.2 | 4133.707 | 1296.515 (31.36%) | 788.215 (19.07%) | |
aliyun_ecs.c8i.large | jdk1.8.0_381 | 2806.944 | 878.567 (31.3%) | 531.576 (18.94%) |
jdk-11.0.20 | 2543.125 | 825.59 (32.46%) | 506.81 (19.93%) | |
jdk-17.0.8 | 2988.839 | 802.596 (26.85%) | 544.516 (18.22%) | |
jdk-21.0.2 | 3016.289 | 817.972 (27.12%) | 550.152 (18.24%) | |
graalvm_21+35.1 | 2792.069 | 1163.345 (41.67%) | 542.845 (19.44%) | |
aliyun_ecs.c8y.large | jdk1.8.0_381 | 4335.516 | 1214.546 (28.01%) | 868.294 (20.03%) |
jdk-11.0.20 | 4426.325 | 1045.154 (23.61%) | 963.755 (21.77%) | |
jdk-17.0.8 | 4416.019 | 1294.38 (29.31%) | 873.617 (19.78%) | |
jdk-21.0.2 | 4714.6 | 1276.054 (27.07%) | 932.961 (19.79%) | |
graalvm_21+35.1 | 4933.836 | 1304.31 (26.44%) | 885.075 (17.94%) |
这个场景是将JavaBean对象序列化为字符串
aliyun ecs spec | jdk version | fastjson2 | fastjson1 | jackson | gson |
---|---|---|---|---|---|
aliyun_ecs.c8a.large | jdk1.8.0_381 | 6041.398 | 1894.253 (31.35%) | 2441.811 (40.42%) | 1295.481 (21.44%) |
jdk-11.0.20 | 6247.467 | 1786.661 (28.6%) | 2479.508 (39.69%) | 857.263 (13.72%) | |
jdk-17.0.8 | 6700.211 | 1992.823 (29.74%) | 2732.272 (40.78%) | 1152.022 (17.19%) | |
jdk-21.0.2 | 6964.859 | 1917.75 (27.53%) | 2450.915 (35.19%) | 1072.381 (15.4%) | |
aliyun_ecs.c8i.large | jdk1.8.0_381 | 4353.482 | 1557.451 (35.77%) | 2130.477 (48.94%) | 948.149 (21.78%) |
jdk-11.0.20 | 4049.01 | 1428.421 (35.28%) | 1917.63 (47.36%) | 798.525 (19.72%) | |
jdk-17.0.8 | 4330.529 | 1487.523 (34.35%) | 2047.48 (47.28%) | 701.589 (16.2%) | |
jdk-21.0.2 | 4743.902 | 1928.679 (40.66%) | 1907.71 (40.21%) | 686.798 (14.48%) | |
graalvm_21+35.1 | 6319.762 | 1742.473 (27.57%) | 2152.451 (34.06%) | 643.746 (10.19%) | |
aliyun_ecs.c8y.large | jdk1.8.0_381 | 5589.642 | 2176.766 (38.94%) | 2722.878 (48.71%) | 1522.36 (27.24%) |
jdk-11.0.20 | 6361.747 | 2049.867 (32.22%) | 2675.049 (42.05%) | 1199.717 (18.86%) | |
jdk-17.0.8 | 6376.831 | 2137.64 (33.52%) | 2907.451 (45.59%) | 920.825 (14.44%) | |
jdk-21.0.2 | 6572.096 | 2039.59 (31.03%) | 2662.801 (40.52%) | 855.198 (13.01%) | |
graalvm_21+35.1 | 8816.301 | 2803.644 (31.8%) | 3022.123 (34.28%) | 840.046 (9.53%) |
这个场景是将JSONObject或者Map序列化为字符串
aliyun ecs spec | jdk version | fastjson2 | fastjson1 | jackson | gson |
---|---|---|---|---|---|
aliyun_ecs.c8a.large | jdk1.8.0_381 | 4005.776 | 2382.583 (59.48%) | 2443.404 (61%) | 1382.538 (34.51%) |
jdk-11.0.20 | 2844.374 | 2288.941 (80.47%) | 2517.317 (88.5%) | 974.497 (34.26%) | |
jdk-17.0.8 | 4123.756 | 2159.845 (52.38%) | 2575.816 (62.46%) | 1228.921 (29.8%) | |
jdk-21.0.2 | 3903.824 | 2324.467 (59.54%) | 2487.28 (63.71%) | 1228.66 (31.47%) | |
aliyun_ecs.c8i.large | jdk1.8.0_381 | 3512.157 | 2056.203 (58.55%) | 1907.41 (54.31%) | 1083.749 (30.86%) |
jdk-11.0.20 | 2504.221 | 1774.456 (70.86%) | 1957.78 (78.18%) | 706.248 (28.2%) | |
jdk-17.0.8 | 3238.289 | 1797.378 (55.5%) | 1839.667 (56.81%) | 735.164 (22.7%) | |
jdk-21.0.2 | 3446.616 | 1814.665 (52.65%) | 1945.937 (56.46%) | 729.571 (21.17%) | |
graalvm_21+35.1 | 3415.7 | 1688.97 (49.45%) | 1947.288 (57.01%) | 687.887 (20.14%) | |
aliyun_ecs.c8y.large | jdk1.8.0_381 | 3793.039 | 2481.139 (65.41%) | 2794.639 (73.68%) | 1703.025 (44.9%) |
jdk-11.0.20 | 3963.227 | 2600.888 (65.63%) | 2859.988 (72.16%) | 1366.488 (34.48%) | |
jdk-17.0.8 | 5108.773 | 2613.907 (51.17%) | 2608.162 (51.05%) | 934.186 (18.29%) | |
jdk-21.0.2 | 4974.389 | 2600.096 (52.27%) | 2696.097 (54.2%) | 962.337 (19.35%) | |
graalvm_21+35.1 | 5302.479 | 3120.453 (58.85%) | 3268.853 (61.65%) | 910.44 (17.17%) |
这个场景是将JavaBean对象序列化为UTF8编码的Bytes
aliyun ecs spec | jdk version | fastjson2 | fastjson1 | jackson | gson |
---|---|---|---|---|---|
aliyun_ecs.c8a.large | jdk1.8.0_381 | 5542.939 | 1756.013 (31.68%) | 2263.805 (40.84%) | 1163.033 (20.98%) |
jdk-11.0.20 | 6458.061 | 2123.597 (32.88%) | 2395.026 (37.09%) | 902.089 (13.97%) | |
jdk-17.0.8 | 7328.996 | 1676.014 (22.87%) | 2562.956 (34.97%) | 1081.508 (14.76%) | |
jdk-21.0.2 | 7529.458 | 1650.322 (21.92%) | 2458.991 (32.66%) | 1076.077 (14.29%) | |
aliyun_ecs.c8i.large | jdk1.8.0_381 | 3803.862 | 1400.561 (36.82%) | 2006.209 (52.74%) | 893.399 (23.49%) |
jdk-11.0.20 | 4409.686 | 1275.596 (28.93%) | 1806.725 (40.97%) | 696.315 (15.79%) | |
jdk-17.0.8 | 4910.394 | 1294.541 (26.36%) | 1973.351 (40.19%) | 693.395 (14.12%) | |
jdk-21.0.2 | 5090.986 | 1402.298 (27.54%) | 2198.058 (43.18%) | 690.496 (13.56%) | |
graalvm_21+35.1 | 5697.936 | 1522.701 (26.72%) | 2603.085 (45.68%) | 641.265 (11.25%) | |
aliyun_ecs.c8y.large | jdk1.8.0_381 | 6344.282 | 2134.93 (33.65%) | 2841.958 (44.8%) | 1316.452 (20.75%) |
jdk-11.0.20 | 6315.113 | 2521.402 (39.93%) | 2573.673 (40.75%) | 1198.397 (18.98%) | |
jdk-17.0.8 | 6587.5 | 2147.744 (32.6%) | 2836.039 (43.05%) | 876.889 (13.31%) | |
jdk-21.0.2 | 7048.3 | 1846.057 (26.19%) | 2683.851 (38.08%) | 891.238 (12.64%) | |
graalvm_21+35.1 | 8402.605 | 2246.969 (26.74%) | 3003.523 (35.75%) | 832.399 (9.91%) |
这个场景是将JSONObject或者Map序列化为UTF8编码的Bytes
aliyun ecs spec | jdk version | fastjson2 | jackson |
---|---|---|---|
aliyun_ecs.c8a.large | jdk1.8.0_381 | 4275.521 | 2520.288 (58.95%) |
jdk-11.0.20 | 3711.239 | 1989.281 (53.6%) | |
jdk-17.0.8 | 4150.637 | 2300.846 (55.43%) | |
jdk-21.0.2 | 4269.537 | 2522.322 (59.08%) | |
aliyun_ecs.c8i.large | jdk1.8.0_381 | 3719.359 | 1982.327 (53.3%) |
jdk-11.0.20 | 2976.217 | 1731.505 (58.18%) | |
jdk-17.0.8 | 3849.578 | 1687.065 (43.82%) | |
jdk-21.0.2 | 3455.727 | 2032.772 (58.82%) | |
graalvm_21+35.1 | 4200.401 | 2171.36 (51.69%) | |
aliyun_ecs.c8y.large | jdk1.8.0_381 | 4679.332 | 3092.69 (66.09%) |
jdk-11.0.20 | 5105.974 | 2342.436 (45.88%) | |
jdk-17.0.8 | 4993.808 | 2848.273 (57.04%) | |
jdk-21.0.2 | 5603.704 | 2837.307 (50.63%) | |
graalvm_21+35.1 | 5331.304 | 3542.348 (66.44%) |