[issue44878] Clumsy dispatching on interpreter entry.

2021-08-18 Thread Mark Shannon


Mark Shannon  added the comment:

I'm somewhat surprised by that. After all, the only change in control flow was 
the change from a break to a goto in exception handling.
I would have expected PR27726 to have made much more difference.

There are a few possibilities, including:
1. It's just a random fluctuation from tiny changes in alignment.
2. MSVC aligns loops, but not switches, or vice-versa, and that makes a 
systematic difference.

I suspect that it is (1), but this is a bit worrying nonetheless.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44878] Clumsy dispatching on interpreter entry.

2021-08-18 Thread neonene


neonene  added the comment:

FYI, PR27727 ("Remove loop...") seems to be a bit slower than the previous 
commit (f08e6d1bb3c5655f184af88c6793e90908bb6338) on my Windows build 
(msvc14.29.16.10). pyperformance shows that

  Windows x64 PGO: 34 slower, 11 faster, 13 not significant, Geometric mean: 
1.02x slower
  Windows x86 PGO: 28 slower, 17 faster, 13 not significant, Geometric mean: 
1.02x slower

Undoing PR27727 on current cpython-main branch also get speed-ups by 1-2% on 
average.

--
nosy: +neonene

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44878] Clumsy dispatching on interpreter entry.

2021-08-12 Thread Mark Shannon


Change by Mark Shannon :


--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44878] Clumsy dispatching on interpreter entry.

2021-08-12 Thread Mark Shannon


Mark Shannon  added the comment:


New changeset a530a9538f3f444bebd2d2b71fe5f2e747e76d73 by Mark Shannon in 
branch 'main':
bpo-44878: Remove loop from interpreter. All dispatching is done by gotos. 
(GH-27727)
https://github.com/python/cpython/commit/a530a9538f3f444bebd2d2b71fe5f2e747e76d73


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44878] Clumsy dispatching on interpreter entry.

2021-08-11 Thread Mark Shannon


Change by Mark Shannon :


--
pull_requests: +26208
pull_request: https://github.com/python/cpython/pull/27727

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44878] Clumsy dispatching on interpreter entry.

2021-08-11 Thread Mark Shannon


Mark Shannon  added the comment:


New changeset f66d00fdd7e9a333accc6bf0e37173051aaa55d0 by Mark Shannon in 
branch 'main':
bpo-44878: Remove the switch from the main interpreter loop when using computed 
gotos. (GH-27726)
https://github.com/python/cpython/commit/f66d00fdd7e9a333accc6bf0e37173051aaa55d0


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44878] Clumsy dispatching on interpreter entry.

2021-08-11 Thread Mark Shannon


Change by Mark Shannon :


--
pull_requests: +26206
pull_request: https://github.com/python/cpython/pull/27726

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44878] Clumsy dispatching on interpreter entry.

2021-08-11 Thread Mark Shannon


Mark Shannon  added the comment:


New changeset 3f3d5dcac336463bd0eed64ba0bd7666ff2da1e1 by Mark Shannon in 
branch 'main':
bpo-44878:  _PyEval_EvalFrameDefault readability improvements (GH-27725)
https://github.com/python/cpython/commit/3f3d5dcac336463bd0eed64ba0bd7666ff2da1e1


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44878] Clumsy dispatching on interpreter entry.

2021-08-11 Thread Mark Shannon


Change by Mark Shannon :


--
pull_requests: +26205
pull_request: https://github.com/python/cpython/pull/27725

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44878] Clumsy dispatching on interpreter entry.

2021-08-10 Thread Mark Shannon


Change by Mark Shannon :


--
keywords: +patch
pull_requests: +26199
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/27715

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44878] Clumsy dispatching on interpreter entry.

2021-08-10 Thread Mark Shannon


New submission from Mark Shannon :

On entering the interpreter (_PyEval_EvalFrameDefault) we need to check for 
tracing in order to record the call.
However, we don't do this cleanly resulting in slow dispatch to the 
non-quickened instruction on every call/next.

--
assignee: Mark.Shannon
messages: 399324
nosy: Mark.Shannon
priority: normal
severity: normal
status: open
title: Clumsy dispatching on interpreter entry.
type: performance
versions: Python 3.11

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com