date - lets-mica/mica-jmh GitHub Wiki
mica 1.2.x 版本压测结果
jdk 8 压测结果
Benchmark Mode Cnt Score Error Units
DateBenchmark.hutoolDateUtil thrpt 5 2792.822 ± 12.878 ops/ms
DateBenchmark.java8DateUtil thrpt 5 2318.862 ± 48.375 ops/ms
DateBenchmark.micaDateUtil thrpt 5 2719.902 ± 92.699 ops/ms
jdk 11 压测结果
Benchmark Mode Cnt Score Error Units
DateBenchmark.hutoolDateUtil thrpt 5 2364.580 ± 264.510 ops/ms
DateBenchmark.java8DateUtil thrpt 5 3238.461 ± 103.797 ops/ms
DateBenchmark.micaDateUtil thrpt 5 3394.626 ± 166.744 ops/ms
结论
mica v1.2.1 的 date format 简化和提高性能,目前已经接近 hutool,高版本的 jdk 优化了 java.time 下的性能,性能非常不错。
mica 1.1.x 版本压力测试
压测结果
Benchmark Mode Cnt Score Error Units
java8DateUtil thrpt 5 2405.924 ± 44.912 ops/ms
micaDateUtil thrpt 5 2541.753 ± 48.321 ops/ms
hutoolDateUtil thrpt 5 2775.531 ± 13.526 ops/ms
结论
hutool 使用的 common lang3 的 FastDateFormat 占用优势。