Skip to content

Some more cython optimizations ? #5

Open
@tzickel

Description

@tzickel

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 .find directly.

Also instead of:

self._bufs = collections.deque()

it's less code

from collections import deque
self._bufs = deque()

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions