INADA Naoki <songofaca...@gmail.com> added the comment:
microbench: $ ./python.patched -m perf timeit --compare-to ./python.master -s 'o="foo"' 'o.encode' python.master: ..................... 29.3 ns +- 0.6 ns python.patched: ..................... 30.9 ns +- 1.3 ns Mean +- std dev: [python.master] 29.3 ns +- 0.6 ns -> [python.patched] 30.9 ns +- 1.3 ns: 1.05x slower (+5%) And this is perf report of python.patched: 33.17% _PyEval_EvalFrameDefault 15.25% _PyObject_GenericGetAttrWithDict 9.63% PyCFunction_NewEx 8.25% _PyType_Lookup 6.42% meth_dealloc 3.50% _Py_bytes_contains 3.22% PyObject_GC_UnTrack 3.20% method_get 2.73% PyObject_GetAttr 2.55% repeat_next 0.88% _Py_Dealloc 0.81% PyObject_GenericGetAttr 0.78% sre_ucs1_match 0.50% lookdict_unicode_nodummy ---------- nosy: +inada.naoki _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue33930> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com