[issue32379] MRO computation could be faster

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

[issue32379] MRO computation could be faster

2017-12-20 Thread Antoine Pitrou
Antoine Pitrou added the comment: New changeset 1f1a34c3145781628e10534440017b3b43211a60 by Antoine Pitrou in branch 'master': bpo-32379: Faster MRO computation for single inheritance (#4932) https://github.com/python/cpython/commit/1f1a34c3145781628e10534440017b3b43211a60 -- __

[issue32379] MRO computation could be faster

2017-12-20 Thread Antoine Pitrou
Antoine Pitrou added the comment: Benchmarks with a parent: * Before: $ ./env-orig/bin/pyperf timeit -s "from unittest import TestCase" "class Test(TestCase): pass" . Mean +- std dev: 10.4 us +- 0.1 us * After: $ ./env/bin/pyperf timeit -s "from unittest import TestCase"

[issue32379] MRO computation could be faster

2017-12-20 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: LGTM in general. But mro() returns a list. "class Test: pass" is a trivial case. What are results if the class has a parent? -- ___ Python tracker ___

[issue32379] MRO computation could be faster

2017-12-19 Thread Antoine Pitrou
Antoine Pitrou added the comment: Benchmarks: * before: $ ./env-orig/bin/pyperf timeit "class Test: pass" . Mean +- std dev: 9.51 us +- 0.17 us * after: $ ./env/bin/pyperf timeit "class Test: pass" . Mean +- std dev: 8.89 us +- 0.09 us -- ___

[issue32379] MRO computation could be faster

2017-12-19 Thread Antoine Pitrou
Change by Antoine Pitrou : -- nosy: +inada.naoki, serhiy.storchaka, vstinner ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue32379] MRO computation could be faster

2017-12-19 Thread Antoine Pitrou
Change by Antoine Pitrou : -- keywords: +patch pull_requests: +4825 stage: -> patch review ___ Python tracker ___ ___ Python-bugs-li

[issue32379] MRO computation could be faster

2017-12-19 Thread Antoine Pitrou
New submission from Antoine Pitrou : MRO computation involves a complicated merge calculation over several lists. But, for the simple (common) case where a class has a single base, the computation could be much simpler: take the base's MRO and prepend the derived class. -- components