STINNER Victor added the comment:

Quick & dirty microbenchmark: I ran bench_fast-2.py of the issue #26814. It 
looks like everything is slower :-p In fact, I already noticed this issue and I 
think that it is fixed with better compilation option: use "./configure 
--with-lto" and "make profile-opt". See my article:
https://haypo.github.io/journey-to-stable-benchmark-deadcode.html

----------------------------------+-------------+---------------
Tests                             |    original |       fastcall
----------------------------------+-------------+---------------
filter                            | 76.2 us (*) |  116 us (+52%)
map                               | 73.6 us (*) |  102 us (+38%)
sorted(list, key=lambda x: x)     |   82 us (*) |  121 us (+48%)
sorted(list)                      | 14.7 us (*) | 17.3 us (+18%)
b=MyBytes(); bytes(b)             |  182 ns (*) |  243 ns (+33%)
namedtuple.attr                   |  802 ns (*) | 1.44 us (+80%)
object.__setattr__(obj, "x", 1)   |  133 ns (*) |  166 ns (+25%)
object.__getattribute__(obj, "x") |  116 ns (*) |  142 ns (+22%)
getattr(1, "real")                |   76 ns (*) |   95 ns (+25%)
bounded_pymethod(1, 2)            |   72 ns (*) |  102 ns (+42%)
unbound_pymethod(obj, 1, 2)       |   71 ns (*) |   99 ns (+38%)
func()                            |   57 ns (*) |   81 ns (+41%)
func(1, 2, 3)                     |   72 ns (*) |  100 ns (+39%)
----------------------------------+-------------+---------------
Total                             |  248 us (*) |  358 us (+44%)
----------------------------------+-------------+---------------

At least, we have a starting point ;-)

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue27128>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to