This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author methane
Recipients methane, serhiy.storchaka, vstinner
Date 2017-02-09.12:20:19
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
I'm sorry, callmethod.patch is tuned other place, and causing SEGV.

method_fastcall2.patch is tuning same function (call_method() in typeobject.c), and uses trick to bypass temporary method object (same to _PyObject_GetMethod()).

$ ./python -m perf timeit --compare-to `pwd`/python.default  -s 'class C:' -s ' def __getitem__(self, index): return index' -s 'c=C()' 'c[0]'
python.default: ..................... 155 ns +- 4 ns
python: ..................... 111 ns +- 1 ns

Median +- std dev: [python.default] 155 ns +- 4 ns -> [python] 111 ns +- 1 ns: 1.40x faster (-28%)
Date User Action Args
2017-02-09 12:20:19methanesetrecipients: + methane, vstinner, serhiy.storchaka
2017-02-09 12:20:19methanesetmessageid: <>
2017-02-09 12:20:19methanelinkissue29507 messages
2017-02-09 12:20:19methanecreate