[issue41347] collections.deque.count performance enhancement

2020-07-20 Thread Dong-hee Na
Change by Dong-hee Na : -- resolution: -> wont fix stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue41347] collections.deque.count performance enhancement

2020-07-20 Thread Dong-hee Na
Dong-hee Na added the comment: > I would rather not do this. I would not like to say this change should be applied ;) I found this point during I converting deque methods by using Argument Clinic(I will ping you later ;) https://bugs.python.org/issue39425 was applied since

[issue41347] collections.deque.count performance enhancement

2020-07-20 Thread Raymond Hettinger
Raymond Hettinger added the comment: I would rather not do this. It optimizes for the uncommon case where all the objects are identical. The common case is slightly worse off because the identity test is performed twice, once before the call to Py_RichCompareBool() and again inside it.

[issue41347] collections.deque.count performance enhancement

2020-07-20 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- nosy: +rhettinger ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue41347] collections.deque.count performance enhancement

2020-07-20 Thread Dong-hee Na
Change by Dong-hee Na : -- keywords: +patch pull_requests: +20710 stage: -> patch review pull_request: https://github.com/python/cpython/pull/21566 ___ Python tracker ___

[issue41347] collections.deque.count performance enhancement

2020-07-20 Thread Dong-hee Na
New submission from Dong-hee Na : Same situation as: https://bugs.python.org/issue39425 Mean +- std dev: [master_count] 946 ns +- 14 ns -> [ac_count] 427 ns +- 7 ns: 2.22x faster (-55%) -- assignee: corona10 components: Extension Modules messages: 374010 nosy: corona10 priority:

[issue41347] collections.deque.count performance enhancement

2020-07-20 Thread Dong-hee Na
Dong-hee Na added the comment: Benchmark file -- Added file: https://bugs.python.org/file49328/bench_deque_count.py ___ Python tracker ___