Random Posts
Tags
Categories
Recent Comments
- lee on 异步事件模型的 Self-pipe trick
- liujiqing on Python 的 asyncio 网络性能比 C 写的 Redis 还好?
- xlb on 你为什么会离开游戏行业?
- ychellboy on CD3:Flash 开发宝典
- Barenboim on 异步事件模型的 Self-pipe trick
Links
Meta
Monthly Archives: December 2022
性能测试:asyncio vs gevent vs native epoll
测试一下 python 的 asyncio 和 gevent 的性能,再和同等 C 程序对比一下,先安装依赖: pip3 install hiredis gevent 如果是 Linux 的话,可以选择安装 uvloop 的包,可以测试加速 asyncio 的效果。 测试程序:echo_bench_gevent.py import sys import gevent import gevent.monkey import hiredis from gevent.server import StreamServer gevent.monkey.patch_all() d = {} def process(req): # … Continue reading