在 TorMySQL 自定义了 IOStream ,简化读写,性能提高明显啊,单进程破万查询了,查询一条记录,两个字段, i5cpu
python2.7 tormysql 0.2.2
2.7.6 (default, Jun 22 2015, 17:58:13)
[GCC 4.8.2]
tormysql 0.2.2
result: 21.210777998s 100199 4723.96606595/s
pypy5.0 tormysql 0.2.2
2.7.10 (bbd45126bc69, Mar 18 2016, 21:35:08)
[PyPy 5.0.1 with GCC 4.8.4]
tormysql 0.2.2
result: 11.9937579632s 100199 8354.26080644/s
python2.7 tormysql 0.2.3
2.7.6 (default, Jun 22 2015, 17:58:13)
[GCC 4.8.2]
tormysql 0.2.3
result: 18.6732668877s 100199 5365.90627675/s
pypy5.0 tormysql 0.2.3
2.7.10 (bbd45126bc69, Mar 18 2016, 21:35:08)
[PyPy 5.0.1 with GCC 4.8.4]
tormysql 0.2.3
result: 7.02699589729s 100199 14259.1477592/s
也顺便是下 Tornado_MySQL 吧
python2.7 tornado_mysql 0.6.3
2.7.6 (default, Jun 22 2015, 17:58:13)
[GCC 4.8.2]
tornado_mysql (0, 6, 3, None)
result: 50.5161859989s 100199 1983.50287178/s
pypy5.0 tornado_mysql 0.6.3
2.7.10 (bbd45126bc69, Mar 18 2016, 21:35:08)
[PyPy 5.0.1 with GCC 4.8.4]
tornado_mysql (0, 6, 3, None)
result: 12.247661829s 100199 8180.9968844/s
1
tinyproxy 2016-04-29 18:12:35 +08:00 via iPhone
你拿 cpython 对比过么?印象中 tornado 有 c 模块用来加速的
|
3
zjxubinbin 2016-04-30 01:21:52 +08:00
无感~已经转到 Rust 了
|
4
jamiesun 2016-04-30 17:17:23 +08:00
tornado 性能不如 cyclone ( twisted ),用 pypy 加速后, tornado 更是不行。
|