[issue32385] Clean up the C3 MRO algorithm implementation.

2017-12-20 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ _

[issue32385] Clean up the C3 MRO algorithm implementation.

2017-12-20 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 6b91a5972107ec8dd5334f4f2005626baa2b8847 by Serhiy Storchaka in branch 'master': bpo-32385: Clean up the C3 MRO algorithm implementation. (#4942) https://github.com/python/cpython/commit/6b91a5972107ec8dd5334f4f2005626baa2b8847 -- __

[issue32385] Clean up the C3 MRO algorithm implementation.

2017-12-20 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: This has also a performance effect. $ ./python -m perf timeit -s "class A: pass" -s "class B: pass" --duplicate 1000 "class C(A, B): pass" Before: Mean +- std dev: 9.41 us +- 0.28 us After: Mean +- std dev: 8.94 us +- 0.28 us --

[issue32385] Clean up the C3 MRO algorithm implementation.

2017-12-20 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- keywords: +patch pull_requests: +4834 stage: -> patch review ___ Python tracker ___ ___ Python-bugs-

[issue32385] Clean up the C3 MRO algorithm implementation.

2017-12-20 Thread Serhiy Storchaka
New submission from Serhiy Storchaka : The C3 MRO algorithm implementation uses lists and converts input tuples to lists. This is redundant, because these lists are not mutated. The proposed PR makes the implementation using tuples and gets rid of unneeded conversions. -- components: I