Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(276145)

#26110: Speedup method calls 1.2x

Can't Edit
Can't Publish+Mail
Start Review
Created:
3 years, 7 months ago by yselivanov
Modified:
2 years, 7 months ago
Reviewers:
storchaka+cpython, brett, ncoghlan, songofacandy
CC:
Thomas Wouters, brett.cannon, jcea, Nick Coghlan, haypo, Benjamin Peterson, dinoviehland_gmail.com, inada.naoki, santagada_gmail.com, devnull_psf.upfronthosting.co.za, storchaka, maciej.szulik, jdemeyer, Yury Selivanov, jstasiak, Josh.R, ebarry, alecsandru.patrascu, florin.papa, eric.fahlgren, rmay31_gmail.com
Visibility:
Public.

Patch Set 1 #

Total comments: 6

Patch Set 2 #

Patch Set 3 #

Patch Set 4 #

Total comments: 21

Patch Set 5 #

Total comments: 2

Patch Set 6 #

Total comments: 12

Patch Set 7 #

Patch Set 8 #

Total comments: 6

Patch Set 9 #

Total comments: 2

Patch Set 10 #

Total comments: 6

Patch Set 11 #

Unified diffs Side-by-side diffs Delta from patch set Stats Patch
Doc/library/dis.rst View 1 2 3 4 5 6 7 8 9 10 1 chunk +22 lines, -0 lines 0 comments Download
Doc/whatsnew/3.7.rst View 1 2 3 4 5 6 7 8 9 10 1 chunk +7 lines, -0 lines 0 comments Download
Python/ceval.c View 1 2 3 4 5 6 7 8 9 10 1 chunk +34 lines, -42 lines 0 comments Download

Messages

Total messages: 17
Yury Selivanov
Found some typos and inaccuracies in code comments. http://bugs.python.org/review/26110/diff/16353/Objects/object.c File Objects/object.c (right): http://bugs.python.org/review/26110/diff/16353/Objects/object.c#newcode1113 Objects/object.c:1113: /* ...
3 years, 7 months ago #1
storchaka
http://bugs.python.org/review/26110/diff/19378/Lib/importlib/_bootstrap_external.py File Lib/importlib/_bootstrap_external.py (right): http://bugs.python.org/review/26110/diff/19378/Lib/importlib/_bootstrap_external.py#newcode252 Lib/importlib/_bootstrap_external.py:252: MAGIC_NUMBER = (3380).to_bytes(2, 'little') + b'\r\n' Please increase the ...
2 years, 8 months ago #2
brett.cannon
http://bugs.python.org/review/26110/diff/19378/Lib/importlib/_bootstrap_external.py File Lib/importlib/_bootstrap_external.py (right): http://bugs.python.org/review/26110/diff/19378/Lib/importlib/_bootstrap_external.py#newcode252 Lib/importlib/_bootstrap_external.py:252: MAGIC_NUMBER = (3380).to_bytes(2, 'little') + b'\r\n' On 2016/12/07 14:49:22, ...
2 years, 8 months ago #3
storchaka
http://bugs.python.org/review/26110/diff/19378/Lib/importlib/_bootstrap_external.py File Lib/importlib/_bootstrap_external.py (right): http://bugs.python.org/review/26110/diff/19378/Lib/importlib/_bootstrap_external.py#newcode252 Lib/importlib/_bootstrap_external.py:252: MAGIC_NUMBER = (3380).to_bytes(2, 'little') + b'\r\n' On 2016/12/07 18:49:18, ...
2 years, 8 months ago #4
Nick Coghlan
Just noting that PC/launcher.c does in fact do range checks on pyc magic numbers. http://bugs.python.org/review/26110/diff/19378/Lib/importlib/_bootstrap_external.py ...
2 years, 8 months ago #5
inada.naoki
http://bugs.python.org/review/26110/diff/19378/Lib/importlib/_bootstrap_external.py File Lib/importlib/_bootstrap_external.py (right): http://bugs.python.org/review/26110/diff/19378/Lib/importlib/_bootstrap_external.py#newcode252 Lib/importlib/_bootstrap_external.py:252: MAGIC_NUMBER = (3380).to_bytes(2, 'little') + b'\r\n' On 2016/12/07 14:49:22, ...
2 years, 8 months ago #6
storchaka
LGTM, but would be nice to clarify one detail with reference counts in ceval loop. ...
2 years, 8 months ago #7
Yury Selivanov
> but would be nice to clarify one detail with reference counts in ceval loop. ...
2 years, 8 months ago #8
storchaka
http://bugs.python.org/review/26110/diff/19458/Doc/library/dis.rst File Doc/library/dis.rst (right): http://bugs.python.org/review/26110/diff/19458/Doc/library/dis.rst#newcode962 Doc/library/dis.rst:962: Calls method or function. *argc* is number of positional ...
2 years, 8 months ago #9
Yury Selivanov
http://bugs.python.org/review/26110/diff/19458/Doc/library/dis.rst File Doc/library/dis.rst (right): http://bugs.python.org/review/26110/diff/19458/Doc/library/dis.rst#newcode963 Doc/library/dis.rst:963: Keyword arguments are not supported. This function is designed ...
2 years, 8 months ago #10
inada.naoki
http://bugs.python.org/review/26110/diff/19458/Doc/library/dis.rst File Doc/library/dis.rst (right): http://bugs.python.org/review/26110/diff/19458/Doc/library/dis.rst#newcode962 Doc/library/dis.rst:962: Calls method or function. *argc* is number of positional ...
2 years, 8 months ago #11
storchaka
http://bugs.python.org/review/26110/diff/19460/Doc/library/dis.rst File Doc/library/dis.rst (right): http://bugs.python.org/review/26110/diff/19460/Doc/library/dis.rst#newcode962 Doc/library/dis.rst:962: Load *method* named ``co_names[namei]`` from ``TOS`` instance. I think ...
2 years, 8 months ago #12
inada.naoki
http://bugs.python.org/review/26110/diff/19460/Doc/library/dis.rst File Doc/library/dis.rst (right): http://bugs.python.org/review/26110/diff/19460/Doc/library/dis.rst#newcode962 Doc/library/dis.rst:962: Load *method* named ``co_names[namei]`` from ``TOS`` instance. On 2016/12/14 ...
2 years, 8 months ago #13
Yury Selivanov
http://bugs.python.org/review/26110/diff/19463/Python/ceval.c File Python/ceval.c (right): http://bugs.python.org/review/26110/diff/19463/Python/ceval.c#newcode3248 Python/ceval.c:3248: meth | obj | arg1 | ... | argN ...
2 years, 8 months ago #14
inada.naoki
http://bugs.python.org/review/26110/diff/19463/Python/ceval.c File Python/ceval.c (right): http://bugs.python.org/review/26110/diff/19463/Python/ceval.c#newcode3248 Python/ceval.c:3248: meth | obj | arg1 | ... | argN ...
2 years, 8 months ago #15
Yury Selivanov
Looks good. http://bugs.python.org/review/26110/diff/19519/Doc/library/dis.rst File Doc/library/dis.rst (right): http://bugs.python.org/review/26110/diff/19519/Doc/library/dis.rst#newcode962 Doc/library/dis.rst:962: Loads method named ``co_names[namei]`` from TOS object. ...
2 years, 7 months ago #16
inada.naoki
2 years, 7 months ago #17
http://bugs.python.org/review/26110/diff/19519/Doc/library/dis.rst
File Doc/library/dis.rst (right):

http://bugs.python.org/review/26110/diff/19519/Doc/library/dis.rst#newcode962
Doc/library/dis.rst:962: Loads method named ``co_names[namei]`` from TOS object.
TOS is popped and
On 2017/01/15 19:57:21, Yury Selivanov wrote:
> `a method`

Done.

http://bugs.python.org/review/26110/diff/19519/Doc/library/dis.rst#newcode963
Doc/library/dis.rst:963: ``method, TOS`` is pushed when interpreter can call
unbound method directly.
On 2017/01/15 19:57:21, Yury Selivanov wrote:
> ``method, TOS`` reads in a bit ambiguous way, one might assume we push a tuple
> to the stack, when in reality we just push two values. I'm not sure if this is
> an actual problem, up to you if you want to tackle this.

Done.

http://bugs.python.org/review/26110/diff/19519/Doc/library/dis.rst#newcode972
Doc/library/dis.rst:972: Calls method.  *argc* is number of positional
arguments.  Keyword arguments
On 2017/01/15 19:57:21, Yury Selivanov wrote:
> Calls a method

Done.
Sign in to reply to this message.

RSS Feeds Recent Issues | This issue
This is Rietveld 894c83f36cb7+