Closed sonots closed 7 years ago
Interesting. I hadn't run benchmarks in a while. Looks like threading.RLock
is faster starting with Py3.4. FastRLock
is essentially unchanged since 2010. Probably no longer worth using these days then (well, except in Python 2 where the advantage is huge, or maybe also when called directly from Cython code).
Thank you!
Additional comments:
In the case of cython with FastRLock C API, fastrlock was pretty faster than threading.RLock
even in Py3.6. Thanks!
Thanks for reporting back!
I wrote benchmark scripts as follows to compare:
lock_bench.py
fastrlock_bench.py
I obtained following results which show fastrlock is not fast.
My python and cython version is as follows:
Could you tell me if I am doing something wrong?