[issue39117] Performance regression for making bound methods

2020-04-28 Thread STINNER Victor
STINNER Victor added the comment: By the way, in sorted(data, key=str.upper): str.upper is an unbound method, no? $ ./python Python 3.9.0a6+ (heads/master:d9a43e20fa, Apr 28 2020, 23:50:37) >>> type(str.upper) -- ___ Python tracker

[issue39117] Performance regression for making bound methods

2020-04-28 Thread STINNER Victor
STINNER Victor added the comment: I compared sorted(data, key=str.upper) performance between before the removal of the free list (parent of commit 3e54b575313c64f541e98216ed079fafed01ff5d) and the current master branch, I get: Mean +- std dev: [master] 167 us +- 4 us -> [cache] 179 us +- 7 u

[issue39117] Performance regression for making bound methods

2020-04-28 Thread STINNER Victor
STINNER Victor added the comment: > read_boundmethod 27.7 ns47.1 ns Extract of Tools/scripts/var_access_benchmark.py: def read_boundmethod(trials=trials, a=A()): for t in trials: a.m;a.m;a.m;a.m;a.m a.m;a.m;a.m;a.m;a.m

[issue39117] Performance regression for making bound methods

2020-04-28 Thread Raymond Hettinger
Raymond Hettinger added the comment: This performance regression in still present in 3.9.0a6 Results from Tools/scripts/var_access_benchmark.py: Python 3.8.2 Python 3.9.0a6 -- read_boundmethod 27

[issue39117] Performance regression for making bound methods

2019-12-27 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- nosy: +pablogsal ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https:/

[issue39117] Performance regression for making bound methods

2019-12-23 Thread Inada Naoki
Inada Naoki added the comment: Is this regression is large enough to revive the free_list for bound methods? -- ___ Python tracker ___

[issue39117] Performance regression for making bound methods

2019-12-23 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- nosy: +inada.naoki, serhiy.storchaka ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubs

[issue39117] Performance regression for making bound methods

2019-12-22 Thread Benjamin Peterson
Benjamin Peterson added the comment: Probably #37340 -- nosy: +benjamin.peterson ___ Python tracker ___ ___ Python-bugs-list mailin

[issue39117] Performance regression for making bound methods

2019-12-21 Thread Raymond Hettinger
New submission from Raymond Hettinger : $ python3.9 -m timeit -r 11 -s 'class A: pass' -s 'A.m = lambda s: None' -s 'a = A()' 'a.m; a.m; a.m; a.m; a.m' 100 loops, best of 11: 230 nsec per loop $ python3.8 -m timeit -r 11 -s 'class A: pass' -s 'A.m = lambda s: None' -s 'a = A()' 'a.m; a.m;