[Cython] Performance comparison with CPython for attribute/item access
Stefan Behnel
stefan_ml at behnel.de
Sun Feb 17 04:57:56 EST 2019
Stefan Behnel schrieb am 16.02.19 um 22:39:
> - The list append/pop optimisations seem to slow down non-lists
> unproportionally, for deques by 3x compared to CPython. That seems worth
> improving.
>
> CPython 3.8 (63fa1cfece)
> ========================
> Stack (or queue) operations:
> 61.6 ns list_append_pop
> 53.9 ns deque_append_pop
>
> Cython 3.0a0 (f1eaa9c1f)
> ========================
> Stack (or queue) operations:
> 20.7 ns list_append_pop
> 155.4 ns deque_append_pop
>
> Cython 3.0a0 (no-opt)
> =====================
> Stack (or queue) operations:
> 66.4 ns list_append_pop
> 75.1 ns deque_append_pop
Fixed for Py3.7+:
20.0 ns list_append_pop
45.5 ns deque_append_pop
https://github.com/cython/cython/issues/2850
Stefan
More information about the cython-devel
mailing list