ThinkChat2.0新版上线,更智能更精彩,支持会话、画图、阅读、搜索等,送10W Token,即刻开启你的AI之旅 广告
## 最新 * 本次均使用了最新的ORM版本。 * 将数据库字段从2个字段增加到20个字段 * 增加getAll性能测试 * 增加mybatis-flex,easyquery的orm工具 * JDBC作为基准测试,直接使用jdbc+无反射,是最快的。在不考虑JDBC的情况下,BeetlSQL性能比MyBatis和JPA都好很多 另外BeetlSQL支持全部9个场景的测试 > 有些dao并不支持一些特性,所以并未出现在下面列表,比如JDBC不支持自动翻页查询,MyBatis不支持one2Many等。 > > 测试机器在这几年中使用了不同的机器,本次测试使用的Mac i7. 测试维度是ops/ms,每毫秒的调用次数。越高越好(Score,Error这里表示误差)。 ``` Benchmark Mode Cnt Score Error Units JMHMain.beetlsqlComplexMapping thrpt 5 255.458 ± 60.277 ops/ms JMHMain.beetlsqlExecuteJdbc thrpt 5 310.825 ± 25.901 ops/ms JMHMain.beetlsqlExecuteTemplate thrpt 5 272.615 ± 10.883 ops/ms JMHMain.beetlsqlFile thrpt 5 265.682 ± 15.083 ops/ms JMHMain.beetlsqlGetAll thrpt 5 13.869 ± 0.431 ops/ms JMHMain.beetlsqlInsert thrpt 5 129.510 ± 73.525 ops/ms JMHMain.beetlsqlLambdaQuery thrpt 5 194.066 ± 20.773 ops/ms JMHMain.beetlsqlOne2Many thrpt 5 174.328 ± 18.469 ops/ms JMHMain.beetlsqlPageQuery thrpt 5 153.528 ± 21.530 ops/ms JMHMain.beetlsqlSelectById thrpt 5 261.294 ± 10.722 ops/ms JMHMain.easyQueryComplexMapping thrpt 5 65.675 ± 24.593 ops/ms JMHMain.easyQueryExecuteJdbc thrpt 5 247.011 ± 10.968 ops/ms JMHMain.easyQueryGetAll thrpt 5 16.568 ± 1.000 ops/ms JMHMain.easyQueryInsert thrpt 5 97.206 ± 13.522 ops/ms JMHMain.easyQueryLambdaQuery thrpt 5 118.802 ± 8.587 ops/ms JMHMain.easyQueryOne2Many thrpt 5 92.302 ± 11.150 ops/ms JMHMain.easyQueryPageQuery thrpt 5 76.613 ± 6.511 ops/ms JMHMain.easyQuerySelectById thrpt 5 112.608 ± 15.603 ops/ms JMHMain.flexGetAll thrpt 5 2.512 ± 0.300 ops/ms JMHMain.flexInsert thrpt 5 99.749 ± 13.610 ops/ms JMHMain.flexPageQuery thrpt 5 34.197 ± 2.840 ops/ms JMHMain.flexSelectById thrpt 5 69.624 ± 3.205 ops/ms JMHMain.jdbcExecuteJdbc thrpt 5 678.643 ± 22.680 ops/ms JMHMain.jdbcGetAll thrpt 5 40.712 ± 1.240 ops/ms JMHMain.jdbcInsert thrpt 5 248.417 ± 157.517 ops/ms JMHMain.jdbcSelectById thrpt 5 670.334 ± 41.391 ops/ms JMHMain.jpaExecuteJdbc thrpt 5 64.450 ± 8.940 ops/ms JMHMain.jpaExecuteTemplate thrpt 5 66.666 ± 6.162 ops/ms JMHMain.jpaGetAll thrpt 5 5.061 ± 0.736 ops/ms JMHMain.jpaInsert thrpt 5 59.919 ± 21.168 ops/ms JMHMain.jpaOne2Many thrpt 5 102.370 ± 5.603 ops/ms JMHMain.jpaPageQuery thrpt 5 59.366 ± 12.308 ops/ms JMHMain.jpaSelectById thrpt 5 61.110 ± 11.092 ops/ms JMHMain.mybatisComplexMapping thrpt 5 107.533 ± 21.488 ops/ms JMHMain.mybatisExecuteTemplate thrpt 5 43.625 ± 3.022 ops/ms JMHMain.mybatisFile thrpt 5 39.576 ± 6.700 ops/ms JMHMain.mybatisGetAll thrpt 5 5.970 ± 0.584 ops/ms JMHMain.mybatisInsert thrpt 5 42.409 ± 4.339 ops/ms JMHMain.mybatisLambdaQuery thrpt 5 23.981 ± 6.069 ops/ms JMHMain.mybatisPageQuery thrpt 5 16.313 ± 3.207 ops/ms JMHMain.mybatisSelectById thrpt 5 44.626 ± 4.049 ops/ms JMHMain.woodExecuteJdbc thrpt 5 124.015 ± 3.367 ops/ms JMHMain.woodExecuteTemplate thrpt 5 123.251 ± 7.691 ops/ms JMHMain.woodFile thrpt 5 124.088 ± 11.738 ops/ms JMHMain.woodGetAll thrpt 5 1.882 ± 0.148 ops/ms JMHMain.woodInsert thrpt 5 107.541 ± 9.479 ops/ms JMHMain.woodLambdaQuery thrpt 5 121.923 ± 11.266 ops/ms JMHMain.woodPageQuery thrpt 5 231.230 ± 16.197 ops/ms JMHMain.woodSelectById thrpt 5 124.842 ± 10.048 ops/ms ```