Skip to content

fastjson2_vs_simdjson

Shaojin Wen edited this page Mar 7, 2025 · 5 revisions

SchemaBasedParseAndSelectBenchmark

0. Script

git clone https://github.com/alibaba/fastjson2.git
cd fastjson2
git checkout c17a8d4a0d7209b4eff29026ea2827b5f5aba822

export JAVA_HOME=~/Install/jdk21
./mvnw clean install -Dmaven.test.skip
~/Install/jdk21/bin/java -cp ~/git/fastjson2/benchmark_21/target/fastjson2-benchmarks.jar com.alibaba.fastjson2.benchmark.simdjson.SchemaBasedParseAndSelectBenchmark

1. aliyun c8a

Benchmark                                           Mode  Cnt  Score   Error   Units
countUniqueUsersWithDefaultProfile_fastjson        thrpt    5  5.156 ? 0.170  ops/ms
countUniqueUsersWithDefaultProfile_jackson         thrpt    5  1.168 ? 0.018  ops/ms
countUniqueUsersWithDefaultProfile_simdjson        thrpt    5  3.721 ? 0.071  ops/ms
countUniqueUsersWithDefaultProfile_simdjsonPadded  thrpt    5  3.850 ? 0.056  ops/ms
countUniqueUsersWithDefaultProfile_wast            thrpt    5  5.313 ? 0.076  ops/ms

2. aliyun c8i

Benchmark                                           Mode  Cnt  Score   Error   Units
countUniqueUsersWithDefaultProfile_fastjson        thrpt    5  4.632 ? 0.009  ops/ms
countUniqueUsersWithDefaultProfile_jackson         thrpt    5  1.056 ? 0.003  ops/ms
countUniqueUsersWithDefaultProfile_simdjson        thrpt    5  3.863 ? 0.032  ops/ms
countUniqueUsersWithDefaultProfile_simdjsonPadded  thrpt    5  4.121 ? 0.012  ops/ms
countUniqueUsersWithDefaultProfile_wast            thrpt    5  4.887 ? 0.014  ops/ms

3. aws c5.xlarge

Benchmark                                           Mode  Cnt  Score   Error   Units
countUniqueUsersWithDefaultProfile_fastjson        thrpt    5  3.414 ? 0.007  ops/ms
countUniqueUsersWithDefaultProfile_jackson         thrpt    5  0.697 ? 0.001  ops/ms
countUniqueUsersWithDefaultProfile_simdjson        thrpt    5  2.146 ? 0.004  ops/ms
countUniqueUsersWithDefaultProfile_simdjsonPadded  thrpt    5  2.235 ? 0.082  ops/ms
countUniqueUsersWithDefaultProfile_wast            thrpt    5  3.740 ? 0.007  ops/ms
Clone this wiki locally