Serhiy Storchaka added the comment: > it wasn't clear to me *where* exactly the enter() speedup was introduced
Constructing Event object. You introduced __init__(). Here is a patch which is based on my patch and new Giampaolo's patch. In additional it fixes a performance for the queue property (perhaps regression was introduced in issue18432). Unpatched: test_cancel : time=4.05863 : calls=1 : stdev=0.00000 test_empty : time=0.00499 : calls=1 : stdev=0.00000 test_enter : time=0.03537 : calls=1 : stdev=0.00000 test_queue : time=37.82003 : calls=1 : stdev=0.00000 test_run : time=0.05289 : calls=1 : stdev=0.00000 cancel3.patch: test_cancel : time=0.00649 : calls=1 : stdev=0.00000 test_empty : time=0.00704 : calls=1 : stdev=0.00000 test_enter : time=0.03959 : calls=1 : stdev=0.00000 test_queue : time=45.34278 : calls=1 : stdev=0.00000 test_run : time=0.05477 : calls=1 : stdev=0.00000 cancel_4.patch: test_cancel : time=0.00889 : calls=1 : stdev=0.00000 test_empty : time=0.00636 : calls=1 : stdev=0.00000 test_enter : time=0.03092 : calls=1 : stdev=0.00000 test_queue : time=3.93284 : calls=1 : stdev=0.00000 test_run : time=0.05294 : calls=1 : stdev=0.00000 ---------- Added file: http://bugs.python.org/file32138/cancel_4.patch _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue13451> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com