diff options
author | billyevans <pervushinai@gmail.com> | 2018-07-20 14:11:41 -0700 |
---|---|---|
committer | Jeff Widman <jeff@jeffwidman.com> | 2018-10-28 21:44:00 -0700 |
commit | 232aed4eca9acfc9fbf468059afabb0bc93f174b (patch) | |
tree | cfca4076122c387aaa082fd8dd0941218c93ede4 /kafka/protocol/struct.py | |
parent | f00016e7cec64cfc9697b233809cd37e0e19cc64 (diff) | |
download | kafka-python-struct-pre-compilation.tar.gz |
Pre-compile pack/unpack function callsstruct-pre-compilation
I noticed that pack/unpack functions from
https://github.com/dpkp/kafka-python/blob/master/kafka/protocol/types.py
might be slightly improved. I made pre-compilation for them. It gives
about 10% better performance compared to the current implementation.
Consumption of 100msg:
```
239884 0.187 0.000 0.287 0.000 types.py:18(_unpack) # new version
239884 0.192 0.000 0.323 0.000 types.py:17(_unpack)
```
I also made some profiling for producers/consumers. It gives about
1-1.5% time savings.
Diffstat (limited to 'kafka/protocol/struct.py')
0 files changed, 0 insertions, 0 deletions