cobs-python icon indicating copy to clipboard operation
cobs-python copied to clipboard

Improve performance of Python fallback on PyPy by ~20x

Open whitequark opened this issue 8 months ago • 0 comments

Whenever you call .cast() on a memoryview in PyPy, it will perform two allocations per iteration in order to map the underlying storage to the requested type. This happens even if the types are the same. I've added a check to avoid this for the common case of passing in a memoryview[bytes].

whitequark avatar May 10 '25 07:05 whitequark