py-pgproto
py-pgproto copied to clipboard
Some more cython optimizations ?
While working on ChunkedBuffer:
https://github.com/tzickel/chunkedbuffer
I think it's for calling python methods which are already bound to a Python object, it's faster to do instead of (check the annotated output):
self._bufs_popleft(...)
this:
with cython.optimize.unpack_method_calls(False):
self._bufs_popleft(...)
^^- but it's better to leave it though for calling other stuff, like when calling an
Also instead of:
self._bufs = collections.deque()
it's less code
from collections import deque
self._bufs = deque()
I think these are micro-optimizations and it's highly unlikely that they would show a detectable speedup.