Mark Shannon added the comment:
New changeset 5498a61c7c25db6f9e76032aa9c5153d79e09889 by Brandt Bucher in
branch 'main':
bpo-46841: Don't use an oparg counter for `STORE_SUBSCR` (GH-31742)
https://github.com/python/cpython/commit/5498a61c7c25db6f9e76032aa
Mark Shannon added the comment:
There are three kinds of changes that we might want to watch (that I can think
of right now):
1. Any change.
Rather coarse and potentially expensive. Used by Cinder.
2. A new key being added (or a change to the keys version as a proxy).
Useful for detect
Change by Mark Shannon :
--
pull_requests: +29915
pull_request: https://github.com/python/cpython/pull/31817
___
Python tracker
<https://bugs.python.org/issue46
Mark Shannon added the comment:
You might not like global variables, they may not show up much in benchmarks,
but people do use them. I suspect a lot of jupyter notebooks have quite a few
global variables.
There should not be much of a slowdown for this code when watching `CONST`:
CONST
Mark Shannon added the comment:
Another use of this is to add watch points in debuggers.
To that end, it would better if the callback were a Python object.
The overhead is relatively small if using the vectorcall protocol.
If the call overhead matters that much, there is something wrong as
Mark Shannon added the comment:
New changeset 304197b3820309e3ed695ff3e6a71461881a1728 by Kumar Aditya in
branch 'main':
bpo-46944: use FASTCALL calling convention in generator.throw (GH-31723)
https://github.com/python/cpython/commit/304197b3820309e3ed695ff3e6a714
Change by Mark Shannon :
--
pull_requests: +29996
pull_request: https://github.com/python/cpython/pull/31901
___
Python tracker
<https://bugs.python.org/issue46
Change by Mark Shannon :
--
pull_requests: +30001
pull_request: https://github.com/python/cpython/pull/31908
___
Python tracker
<https://bugs.python.org/issue45
Mark Shannon added the comment:
Let me give you an example.
#module eggs
eggs_var = 0 # a variable, maybe a counter or similar
EGGS_CONST # a constant
#module spam
import eggs
spam_var # Another variable
def foo():
use(eggs.EGGS_CONST)
-
We will want to treat
Mark Shannon added the comment:
sys.settrace line events cannot use the co_lines table. They need additional
state, as we don't want to trace the same line twice (unless there is a
backwards jump).
Using the start of a entry in `co_lines` doesn't work when some entries have no
l
Mark Shannon added the comment:
New changeset 099f75614100e88ed90b68d20a51a8d9c22f81a7 by Mark Shannon in
branch 'main':
bpo-45923: Decouple suspension of tracing from tracing flag. (GH-31908)
https://github.com/python/cpython/commit/099f75614100e88ed90b68d20a51a8
Change by Mark Shannon :
--
pull_requests: +30025
pull_request: https://github.com/python/cpython/pull/31933
___
Python tracker
<https://bugs.python.org/issue46
Change by Mark Shannon :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
New submission from Mark Shannon :
The RESUME instruction was added to make resumption points explicit in the
bytecode. This makes it easier to implement tracing, quickening, and interrupt
checks as there is an explicit place to perform these checks.
Unfortunately, it also has considerable
New submission from Mark Shannon :
When tracing, the event supplied is insufficient to determine what is actually
happening.
E.g. A "call" event could be a call to a function or resuming a generator or
coroutine.
Adding a state field to the FrameObject would allow these c
Change by Mark Shannon :
--
keywords: +patch
pull_requests: +30052
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/31963
___
Python tracker
<https://bugs.python.org/issu
Mark Shannon added the comment:
New changeset 2bde6827ea4f136297b2d882480b981ff26262b6 by Brandt Bucher in
branch 'main':
bpo-46841: Quicken code in-place (GH-31888)
https://github.com/python/cpython/commit/2bde6827ea4f136297b2d882480b98
Mark Shannon added the comment:
You are on own if you create code objects by calling `types.CodeType`.
The docs could be a lot clearer about that, though.
--
___
Python tracker
<https://bugs.python.org/issue45
Mark Shannon added the comment:
The `JUMP_ABSOLUTE` doesn't have a line number, as it doesn't correspond to any
source.
The jump back to the top could follow either the `if i >= 0:` or the `pass`, so
cannot have a line number.
Don't expect every bytecode to map directly
Mark Shannon added the comment:
New changeset 49daf6dba8178c5ae5d4d65408b20566d39c36a8 by Mark Shannon in
branch 'main':
bpo-47045: Remove `f_state` field (GH-31963)
https://github.com/python/cpython/commit/49daf6dba8178c5ae5d4d65408b205
Mark Shannon added the comment:
I think this is fixed (for 3.11 at least) by
https://github.com/python/cpython/pull/31888
--
___
Python tracker
<https://bugs.python.org/issue46
Mark Shannon added the comment:
I'm looking into adding two new APIs.
One to round out the getters for FrameObject and one to introspect the internal
frame stack.
It would probably make more sense to add this capability to the frame stack
API, as it would avoid creating the frame obje
Change by Mark Shannon :
--
pull_requests: +30145
pull_request: https://github.com/python/cpython/pull/32055
___
Python tracker
<https://bugs.python.org/issue42
Change by Mark Shannon :
--
pull_requests: +30147
pull_request: https://github.com/python/cpython/pull/32055
___
Python tracker
<https://bugs.python.org/issue42
Mark Shannon added the comment:
With the introduction of zero cost exceptions, there is no block stack.
--
resolution: -> out of date
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Mark Shannon added the comment:
New changeset d7163bb35d1ed46bde9affcd4eb267dfd0b703dd by Mark Shannon in
branch 'main':
bpo-42197: Don't create `f_locals` dictionary unless we actually need it.
(GH-32055)
https://github.com/python/cpython/commit/d7163bb35d1ed46bde9affcd4
Change by Mark Shannon :
--
pull_requests: +30190
pull_request: https://github.com/python/cpython/pull/32114
___
Python tracker
<https://bugs.python.org/issue40
Mark Shannon added the comment:
New changeset cca43b7d64f47ea921d0f7a347ae1a839c5463c3 by Dennis Sweeney in
branch 'main':
bpo-47053: Reduce deoptimization in BINARY_OP_INPLACE_ADD_UNICODE (GH-31318)
https://github.com/python/cpython/commit/cca43b7d64f47ea921d0f7a347ae1a
Mark Shannon added the comment:
I think that adding macros makes readability worse.
The macro is only more readable if you already know what it does.
If you don't, then you need to look up the macro, and understand the cast in
the macro (which is harder than understanding the original
Mark Shannon added the comment:
The problem in the example you give is the need for the cast in the first
place. If `func` were a `PyCFunctionObject *` instead of a `PyObject *`, then
there would be no cast.
Making the casts explicit serves as a reminder that a type check is needed
Mark Shannon added the comment:
New changeset a00518d9ad9a8f408a9699191019d75dd8406c32 by Irit Katriel in
branch 'main':
bpo-47120: Replace the JUMP_ABSOLUTE opcode by the relative JUMP_BACKWARD
(GH-32115)
https://github.com/python/cpython/commit/a00518d9ad9a8f408a9699191019d7
Mark Shannon added the comment:
New changeset 74b95d86e0f14603f878c4df3133bc8a93f8f80a by Mark Shannon in
branch 'main':
bpo-40421: Add missing getters for frame object attributes to C-API. (GH-32114)
https://github.com/python/cpython/commit/74b95d86e0f14603f878c4df3133bc
Mark Shannon added the comment:
New changeset a0ea7a116ce52a178c02d42b684089758bd7f355 by Dennis Sweeney in
branch 'main':
bpo-47009: Streamline list.append for the common case (GH-31864)
https://github.com/python/cpython/commit/a0ea7a116ce52a178c02d42b684089758bd7f355
-
Mark Shannon added the comment:
New changeset bd2e47c8830d1b2869f2b4345945a5e0c3b4e3fb by Brandt Bucher in
branch 'main':
bpo-46841: Avoid unnecessary allocations in code object comparisons (GH-3)
https://github.com/python/cpython/commit/bd2e47c8830d1b2869f2b4345945a5
Mark Shannon added the comment:
New changeset ae9de82e321581e1906c6ef2a7ad83ab30ae3325 by Brandt Bucher in
branch 'main':
bpo-46841: Use a `bytes` object for `_co_code_adaptive` (GH-32205)
https://github.com/python/cpython/commit/ae9de82e321581e1906c6ef2a7ad83
Mark Shannon added the comment:
New changeset 04e07c258f4f2ac85e25355242a113f98a706f04 by Irit Katriel in
branch 'main':
bpo-47186: Replace JUMP_IF_NOT_EXC_MATCH by CHECK_EXC_MATCH + jump (GH-32231)
https://github.com/python/cpython/commit/04e07c258f4f2ac85e25355242a113
Mark Shannon added the comment:
New changeset 997ba5d126f5040d5b7536f73bc89049e9f9421d by Irit Katriel in
branch 'main':
bpo-47172: Compiler enhancements (GH-32200)
https://github.com/python/cpython/commit/997ba5d126f5040d5b7536f73bc89049e9f9421d
--
nosy: +Ma
Change by Mark Shannon :
--
pull_requests: +30363
pull_request: https://github.com/python/cpython/pull/32301
___
Python tracker
<https://bugs.python.org/issue44
New submission from Mark Shannon :
We need to provide an API to create, swap and free frame stacks for greenlets.
Since this is primarily for greenlets (and any other stackful coroutines
libraries that want to use it) it will be "unstable".
In this case, by "unstable" I
Change by Mark Shannon :
--
keywords: +patch
pull_requests: +30366
stage: needs patch -> patch review
pull_request: https://github.com/python/cpython/pull/32303
___
Python tracker
<https://bugs.python.org/issu
Mark Shannon added the comment:
New changeset 8a349eb30b54bab9a7146fc10e3379c3cacaa19e by Mark Shannon in
branch 'main':
Revert "bpo-44800: Document internal frame naming conventions (GH-32281)"
(#32301)
https://github.com/python/cpython/commit/8a349eb30b54bab9a714
Change by Mark Shannon :
--
keywords: +patch
pull_requests: +30367
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/32304
___
Python tracker
<https://bugs.python.org/issu
Mark Shannon added the comment:
New changeset 6c6e0408a663c1f53dad403f54a18d444da39cb7 by Dennis Sweeney in
branch 'main':
bpo-47009: Let PRECALL_NO_KW_LIST_APPEND do its own POP_TOP (GH-32239)
https://github.com/python/cpython/commit/6c6e0408a663c1f53dad403f54a18d
New submission from Mark Shannon :
The 3 regular expression benchmarks in the pyperformance suite, regex_v8,
regex_effbot and regex_dna show slowdowns between 3% and 10%.
Looking at the stats, nothing seems wrong with specialization or the memory
optimizations.
Which strongly suggests a
Change by Mark Shannon :
--
pull_requests: +30439
pull_request: https://github.com/python/cpython/pull/32413
___
Python tracker
<https://bugs.python.org/issue40
Mark Shannon added the comment:
Don't you need to know if a "call" event is a call or the resumption of a
generator?
--
___
Python tracker
<https://bugs.pyt
Mark Shannon added the comment:
This seems like the correct thing to do.
Since the AST changes from version to version, I don't see how these files
could reasonably be part of the limited API.
--
nosy: +Mark.Shannon
___
Python tracker
&
Mark Shannon added the comment:
New changeset 421a72af4deaec96a49a79951b9c2546a2faa13d by Mark Shannon (Zackery
Spytz) in branch 'master':
bpo-21120: Exclude Python-ast.h, ast.h and asdl.h from the limited API (#14634)
https://github.com/python/cpyt
Change by Mark Shannon :
--
stage: patch review -> resolved
___
Python tracker
<https://bugs.python.org/issue21120>
___
___
Python-bugs-list mailing list
Un
Change by Mark Shannon :
--
status: open -> closed
___
Python tracker
<https://bugs.python.org/issue21120>
___
___
Python-bugs-list mailing list
Unsubscrib
New submission from Mark Shannon :
Consider a flow graph of four nodes, A, B, C, D
where the A, B, C are "next" successors of each other (in order) and C branches
to B and B branches to D. Note that there is no "next" link to the D block.
The correct order is A, B, C, D bu
Change by Mark Shannon :
--
nosy: +pablogsal
___
Python tracker
<https://bugs.python.org/issue38135>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Mark Shannon :
--
keywords: +patch
pull_requests: +15664
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/16042
___
Python tracker
<https://bugs.python.org/issu
Mark Shannon added the comment:
I expect to fix this is as part of the general improvements I am making to the
bytecode, interpreter and compiler.
So it should be fixed for 3.9 but not for 3.8
--
___
Python tracker
<https://bugs.python.
Mark Shannon added the comment:
"What's new in Python 3.8" says that this change speeds up the LOAD_GLOBAL
opcode by 40%.
That seems meaningless as a program cannot have LOAD_GLOBAL in isolation so any
test would have other bytecodes as well.
What's the evidence for
Mark Shannon added the comment:
Given that
def foo(): int; str; bytes; float; int; str; bytes; float
can be trivially be rewritten as
def foo(): pass
I think that benchmark is meaningless.
I really don't think we should be making claims like "40% speedup" for such
contrive
Mark Shannon added the comment:
I'm strongly opposed to this change.
PEP 523 does not specify what the semantics of changing the interpreter frame
evaluator actually is:
Is the VM obliged to call the new interpreter?
What happens if the custom evaluator leaves the VM in a inconsistent
Mark Shannon added the comment:
Fabio,
OOI what are you trying achieve by changing the frame evaluator?
--
___
Python tracker
<https://bugs.python.org/issue38
Mark Shannon added the comment:
Victor,
I don't think this is a regression.
`PyThreadState` is an internal opaque data structure, which means we are free
to change it.
That the `eval_frame` is hard to access is a feature not a bug, as it
discourages misuse and enables us to remove it e
Change by Mark Shannon :
--
keywords: +patch
pull_requests: +23619
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/24859
___
Python tracker
<https://bugs.python.org/issu
Mark Shannon added the comment:
New changeset d48848c83e0f3e41b65c8f741f3fb6dbce5b9c29 by Mark Shannon in
branch 'master':
bpo-39316: Make sure that attribute accesses and stores, including method
calls, conform to PEP 626. (GH-24859)
https://github.com/python/cpyt
Change by Mark Shannon :
--
pull_requests: +23620
pull_request: https://github.com/python/cpython/pull/24860
___
Python tracker
<https://bugs.python.org/issue42
Mark Shannon added the comment:
New changeset a8ef4572a6b28bcfc0b10b34fa4204954b9dd761 by tsukasa-au in branch
'master':
bpo-43497: Emit SyntaxWarnings for assertions with tuple constants. (GH-24867)
https://github.com/python/cpython/commit/a8ef4572a6b28bcfc0b10b34fa4204
Mark Shannon added the comment:
No. We should add it.
--
___
Python tracker
<https://bugs.python.org/issue42246>
___
___
Python-bugs-list mailing list
Unsub
Change by Mark Shannon :
--
pull_requests: +23654
pull_request: https://github.com/python/cpython/pull/24892
___
Python tracker
<https://bugs.python.org/issue42
Change by Mark Shannon :
--
pull_requests: +23665
pull_request: https://github.com/python/cpython/pull/24902
___
Python tracker
<https://bugs.python.org/issue42
Mark Shannon added the comment:
Why?
Do you have any evidence that the overhead of super() is significant in real
programs, or that the proposed change actually speeds up anything beyond your
micro-benchmark?
--
nosy: +Mark.Shannon
___
Python
Mark Shannon added the comment:
Numbers please.
What is "non-negligible cost of allocation/initialization" mean as a fraction
of runtime?
What sort of speed up are you seeing on whole programs?
--
___
Python tracker
<https://bu
Mark Shannon added the comment:
PEP 511 was rejected.
The "peephole" optimizer now operates on the internal IR, not the bytecode.
--
nosy: +Mark.Shannon
resolution: -> out of date
stage: -> resolved
status: open -> closed
___
Mark Shannon added the comment:
frame.f_lasti and traceback.tb_lasti are best left as byte offsets.
There is no guarantee that we won't go back to variable length instructions.
For example, a "LONG_JUMP" instruction which is 4 bytes long and takes a 3 byte
offset might well
Change by Mark Shannon :
--
pull_requests: +23819
pull_request: https://github.com/python/cpython/pull/25069
___
Python tracker
<https://bugs.python.org/issue27
Mark Shannon added the comment:
I don't understand what the problem is. _pyio.open is a function not a static
method.
>>> import _pyio
>>> _pyio.open
--
nosy: +Mark.Shannon
title: Make static methods created by @staticmethod callable -> Make functio
Mark Shannon added the comment:
Isn't the problem that Python functions are (non-overriding) descriptors, but
builtin-functions are not descriptors?
Changing static methods is not going to fix that.
How about adding wrappers to make Python functions behave like builtin
functions and
New submission from Mark Shannon :
Every time we send, or throw, to a generator, the C code in genobject.c needs
to check what state the generator is in.
This is inefficient and couples the generator code, which should just be a thin
wrapper around the interpreter, to the internals of the
Mark Shannon added the comment:
Ned, can I close this?
--
___
Python tracker
<https://bugs.python.org/issue42823>
___
___
Python-bugs-list mailing list
Unsub
Change by Mark Shannon :
--
assignee: -> Mark.Shannon
stage: -> needs patch
type: -> performance
___
Python tracker
<https://bugs.python.or
Mark Shannon added the comment:
The bytecode instruction set has changed a lot since 3.6, so I think a backport
would be impractical.
3.6 is in security fix only mode, so you'd need to take this up with Red Hat.
--
___
Python tracker
&
Change by Mark Shannon :
--
keywords: +patch
pull_requests: +23884
stage: needs patch -> patch review
pull_request: https://github.com/python/cpython/pull/25137
___
Python tracker
<https://bugs.python.org/issu
New submission from Mark Shannon :
In the interpreter and compiler, the "fast" locals array and cells array are
treated separately. By merging them in the compiler, the interpreter can be
simplified a bit.
--
assignee: Mark.Shannon
components: Interpreter Core
messages: 3
Mark Shannon added the comment:
New changeset fcb55c0037baab6f98f91ee38ce84b6f874f034a by Mark Shannon in
branch 'master':
bpo-27129: Use instruction offsets, not byte offsets, in bytecode and
internally. (GH-25069)
https://github.com/python/cpyt
Change by Mark Shannon :
--
pull_requests: +23885
pull_request: https://github.com/python/cpython/pull/25138
___
Python tracker
<https://bugs.python.org/issue43
Mark Shannon added the comment:
That assertion is correct, and hasn't changed.
Do you have a traceback?
The buildbot just shows the assertion message with no context.
--
___
Python tracker
<https://bugs.python.org/is
Change by Mark Shannon :
--
keywords: +patch
pull_requests: +23899
stage: needs patch -> patch review
pull_request: https://github.com/python/cpython/pull/25152
___
Python tracker
<https://bugs.python.org/issu
Change by Mark Shannon :
--
keywords: +patch
pull_requests: +23907
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/25160
___
Python tracker
<https://bugs.python.org/issu
Mark Shannon added the comment:
New changeset c368ce74d2c9bcbf1ec320466819c2d4768252f7 by Dennis Sweeney in
branch 'master':
bpo-27129: Update magic numbers and bootstrapping for GH-25069 (GH-25172)
https://github.com/python/cpython/commit/c368ce74d2c9bcbf1ec320466819c2
Mark Shannon added the comment:
New changeset b37181e69209746adc2119c471599a1ea5faa6c8 by Mark Shannon in
branch 'master':
bpo-43683: Handle generator entry in bytecode (GH-25138)
https://github.com/python/cpython/commit/b37181e69209746adc2119c471599a
Change by Mark Shannon :
--
pull_requests: +23961
pull_request: https://github.com/python/cpython/pull/25224
___
Python tracker
<https://bugs.python.org/issue43
Mark Shannon added the comment:
For any sane design of tagged pointers, `x == y` (in C) will work fine.
`is` is not well defined except for a small set of values, so the docs for
`Py_Is` would have to so vague as to be worthless, IMO.
--
nosy: +Mark.Shannon
Change by Mark Shannon :
--
resolution: -> fixed
status: open -> closed
___
Python tracker
<https://bugs.python.org/issue40228>
___
___
Python-bugs-list
Mark Shannon added the comment:
PEP 626 fixed this
--
___
Python tracker
<https://bugs.python.org/issue39537>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Mark Shannon :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
New submission from Mark Shannon :
The DISPATCH() macro has two failings.
1. Its check for tracing involves too much pointer chaser.
2. The logic assumes that computed-gotos is the "fast path" which makes switch
dispatch, and therefore Python on Windows unnecess
Change by Mark Shannon :
--
keywords: +patch
pull_requests: +23984
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/25244
___
Python tracker
<https://bugs.python.org/issu
Mark Shannon added the comment:
New changeset 7a7ba3d343d360a03a34bc3901628f9f40a58307 by tomKPZ in branch
'master':
bpo-43495 : Push missing frame block in compile.c (GH-24865)
https://github.com/python/cpython/commit/7a7ba3d343d360a03a34bc3901628f9f40a58307
--
nosy: +Ma
Mark Shannon added the comment:
I implemented it ages ago :)
https://github.com/python/cpython/pull/24417
I need to be better at closing issues.
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Pytho
Mark Shannon added the comment:
New changeset 28d28e053db6b69d91c2dfd579207cd8ccbc39e7 by Mark Shannon in
branch 'master':
bpo-43760: Streamline dispatch sequence for machines without computed gotos.
(GH-25244)
https://github.com/python/cpyt
Change by Mark Shannon :
--
pull_requests: +24013
pull_request: https://github.com/python/cpython/pull/25276
___
Python tracker
<https://bugs.python.org/issue43
Mark Shannon added the comment:
This is a significant change to the language.
There should be a PEP, or at the very least a discussion on Python Dev.
There may well be a very good reason why static methods have not been made
callable before that you have overlooked.
Changing static methods
Mark Shannon added the comment:
Are you asking why breaking backwards compatibility is an issue?
Or how it breaks backwards compatibility?
pydoc could be changed to produce the proposed output, it doesn't need this
change.
We don't know what this change will break, but we do know
Mark Shannon added the comment:
New changeset 9e7b2076fb4380987ad0262c4c0ca900b06475ad by Mark Shannon in
branch 'master':
bpo-43760: Speed up check for tracing in interpreter dispatch (#25276)
https://github.com/python/cpython/commit/9e7b2076fb4380987ad0262c4c0ca9
201 - 300 of 1219 matches
Mail list logo