This repository was archived by the owner on Jun 17, 2020. It is now read-only.

Description
This is the first time I'm using zero_buffer so I'm not sure if this is a regression or if I'm doing something wrong. The following is run on head -n10000 /usr/share/dict/words:
$ time python3 bench_line_reading.py py
real 0m0.353s
user 0m0.334s
sys 0m0.016s
$ time python3 bench_line_reading.py zero_buffer
real 0m9.250s
user 0m9.226s
sys 0m0.019s
Profiling indicates that BufferView.__getitem__ and BufferView._split_char are the biggest culprits.
I tried to replace simple bytes-copying code with zero_buffer in a real-world parser I'm building and performance is also worse by orders of magnitude.
Python 3.4.1
cffi==0.8.6
zero-buffer==0.5.1