Mark Shannon added the comment:
New changeset 8ac0886091c27bf4b6bb0a9b571e174b554d31a4 by Irit Katriel in
branch 'main':
bpo-44890: collect specialization stats if Py_DEBUG (GH-27731)
https://github.com/python/cpython/commit/8ac0886091c27bf4b6bb0a9b571e174b554d31a4
--
nosy
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
Mark Shannon added the comment:
New changeset ddd1c418c05da0de978c75dfb3e4a5b8d27e1d9f by Irit Katriel in
branch 'main':
bpo-44725 : expose specialization stats in python (GH-27192)
https://github.com/python/cpython/commit/ddd1c418c05da0de978c75dfb3e4a5b8d27e1d9f
--
nosy
Mark Shannon added the comment:
Pablo,
There is another failure on that buildbot: test_inspect fails with
^^
File "/home/mark/repos/cpython/Lib/inspect.py", line 1154, in walktree
classes.sort(key=attrgetter('__module__',
Change by Mark Shannon :
--
pull_requests: +26051
stage: resolved -> patch review
pull_request: https://github.com/python/cpython/pull/27542
___
Python tracker
<https://bugs.python.org/issu
Mark Shannon added the comment:
New changeset cee67fa66129b5d1db5c8aa3884338f82f0da3de by Mark Shannon in
branch 'main':
bpo-44821: Eagerly assign __dict__ for new objects. (GH-27589)
https://github.com/python/cpython/commit/cee67fa66129b5d1db5c8aa3884338f82f0da3de
Change by Mark Shannon :
--
keywords: +patch
pull_requests: +26091
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/27589
___
Python tracker
<https://bugs.python.org/issu
Change by Mark Shannon :
--
keywords: +patch
pull_requests: +26092
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/27590
___
Python tracker
<https://bugs.python.org/issu
New submission from Mark Shannon :
Currently, instance dictionaries (__dict__ attribute) are created lazily when
the first attribute is set.
This is bad for performance for a number of reasons:
1. It causes additional checks on every attribute access.
2. It causes allocation of the object
Mark Shannon added the comment:
Raymond,
When you say "this was mostly a net win" do you mean the more compact layout or
ordering?
The compact layout is obviously a win, and doesn't conflict with sharing. The
problem is that ordering conflicts with sharing.
As long as instance
New submission from Mark Shannon :
Add specializations of STORE_ATTR following the pattern of LOAD_ATTR and
LOAD_GLOBAL.
For this to work well we need https://bugs.python.org/issue44821, otherwise the
first assigned to an attribute of any object cannot be specialized.
--
messages
Change by Mark Shannon :
--
pull_requests: +26206
pull_request: https://github.com/python/cpython/pull/27726
___
Python tracker
<https://bugs.python.org/issue44
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
Change by Mark Shannon :
--
pull_requests: +26208
pull_request: https://github.com/python/cpython/pull/27727
___
Python tracker
<https://bugs.python.org/issue44
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
Mark Shannon added the comment:
I've trying to do this since about 2011 :)
--
___
Python tracker
<https://bugs.python.org/issue45256>
___
___
Python-bugs-list m
Change by Mark Shannon :
--
pull_requests: +26872
pull_request: https://github.com/python/cpython/pull/28474
___
Python tracker
<https://bugs.python.org/issue43
Mark Shannon added the comment:
If we are hitting a size limit for PGO, then we need to reduce the size of
_PyEval_EvalFrameDefault, to let the compiler do its job.
Force inlining stuff is not going to help.
Reverting https://github.com/python/cpython/pull/25244 for 3.10 seems
Change by Mark Shannon :
--
pull_requests: +26873
pull_request: https://github.com/python/cpython/pull/28475
___
Python tracker
<https://bugs.python.org/issue45
Mark Shannon added the comment:
IMO those failures are bugs in the projects listed not in CPython.
Relying on the exact meaning, or even the existence of an undocumented field of
a C struct is not, nor ever has been, safe.
The user of the field is assuming a meaning that is not known
Mark Shannon added the comment:
Raymond,
Only split dicts need the extra field.
Classes where many instances do not have exactly the same set of attributes may
be more common than you think.
There are many reasons why some attributes may be added conditionally.
PR 28520 actually makes
Change by Mark Shannon :
--
pull_requests: +27145
pull_request: https://github.com/python/cpython/pull/28829
___
Python tracker
<https://bugs.python.org/issue45
Mark Shannon added the comment:
I disagree. All that is doing is locking in the current poor interface.
We do need to extend the C API for these uses, yes. But we need an API that
addresses Cython's needs directly and at a higher level.
For example, Cython often wants to insert a frame
Change by Mark Shannon :
--
pull_requests: +27226
pull_request: https://github.com/python/cpython/pull/28937
___
Python tracker
<https://bugs.python.org/issue45
Mark Shannon added the comment:
New changeset a8b9350964f43cb648c98c179c8037fbf3ff8a7d by Mark Shannon in
branch 'main':
bpo-45340: Don't create object dictionaries unless actually needed (GH-28802)
https://github.com/python/cpython/commit/a8b9350964f43cb648c98c179c8037fbf3ff8a7d
Mark Shannon added the comment:
New changeset 3901c081143ef29624f9c1cb49cc70a70321d139 by Pablo Galindo Salgado
in branch 'main':
bpo-45256: Fix cleanup of stolen locals for Python-to-Python calls (GH-28905)
https://github.com/python/cpython/commit/3901c081143ef29624f9c1cb49cc70a70321d139
Mark Shannon added the comment:
Josh,
I'm not really following the details of what you are saying.
You claim "Key-sharing dictionaries were accepted largely without question
because they didn't harm code that broke them".
Is that true? I don't remember it that way. They wer
New submission from Mark Shannon :
Currently, we use the `tp_version_tag` as a proxy for the state of a class when
specializing.
When we have issued 2**32 tags, we stop issuing tags. This prevents
specializing of classes that need a new tag.
We can make a few enhancements:
1. Reserve
Mark Shannon added the comment:
New changeset 3b3d30e8f78271a488965c9cd11136e1aa890757 by Dennis Sweeney in
branch 'main':
bpo-45367: Specialize BINARY_MULTIPLY (GH-28727)
https://github.com/python/cpython/commit/3b3d30e8f78271a488965c9cd11136e1aa890757
New submission from Mark Shannon :
Every time we get a cache hit in, e.g. LOAD_ATTR_CACHED, we increment the
saturating counting. Takes a dependent load and a store, as well as the shift.
For fast instructions like BINARY_ADD_FLOAT, this represents a significant
portion of work done
Change by Mark Shannon :
--
nosy: +kj
___
Python tracker
<https://bugs.python.org/issue45527>
___
___
Python-bugs-list mailing list
Unsubscribe:
Mark Shannon added the comment:
New changeset 3163e68c342434db37c69669017f96a4bb2d5f13 by Ken Jin in branch
'main':
bpo-44525: Specialize ``CALL_FUNCTION`` for C function calls (GH-26934)
https://github.com/python/cpython/commit/3163e68c342434db37c69669017f96a4bb2d5f13
Mark Shannon added the comment:
New changeset 8863a0fcc5f04ab7c3428e713917831f9b1deb18 by Mark Shannon in
branch 'main':
bpo-44525: Specialize simple Python calls. (GH-29033)
https://github.com/python/cpython/commit/8863a0fcc5f04ab7c3428e713917831f9b1deb18
Change by Mark Shannon :
--
pull_requests: +27355
pull_request: https://github.com/python/cpython/pull/29033
___
Python tracker
<https://bugs.python.org/issue44
Mark Shannon added the comment:
Josh, please reopen if you have more to add.
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Change by Mark Shannon :
--
keywords: +patch
pull_requests: +27361
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/29092
___
Python tracker
<https://bugs.python.org/issu
Mark Shannon added the comment:
Nothing to do with it being Windows, or computed gotos.
I forgot to bump magic number again :(
--
assignee: -> Mark.Shannon
___
Python tracker
<https://bugs.python.org/issu
New submission from Mark Shannon :
https://github.com/python/cpython/pull/28488 breaks PEP 523 as it bypasses
_PyEval_EvalFrame.
The fix is simple, we need to check tstate->interp->eval_frame.
--
assignee: Mark.Shannon
components: Interpreter Core
messages: 403637
nosy: Mark.S
Change by Mark Shannon :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Mark Shannon added the comment:
Struct names aren't exported as symbols.
$ nm ./python | grep CFrame
So, I assume that are worried about name clashes for code that has
#include "Python.h".
Isn't the threadstate struct supposed to be opaque?
If so, then shouldn't it be moved to a
Change by Mark Shannon :
--
keywords: +patch
pull_requests: +27169
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/28871
___
Python tracker
<https://bugs.python.org/issu
Mark Shannon added the comment:
New changeset 70945d57e775b335eb58b734d82e68484063e835 by Mark Shannon in
branch 'main':
bpo-45256: Avoid C calls for most Python to Python calls. (GH-28937)
https://github.com/python/cpython/commit/70945d57e775b335eb58b734d82e68484063e835
Mark Shannon added the comment:
PR 28488 has no NEWS entry, or What's New entry.
However, adding multiple entries will be confusing, so that's best left until
all calls to Python functions and method don't use the C stack.
--
___
Python tracker
Mark Shannon added the comment:
There is a clear disadvantage in moving the docstring from the function's code
object to the enclosing code object:
Docstrings are rarely looked at (relative to other operations on functions).
Inner functions and comprehensions are created many times
Mark Shannon added the comment:
Regarding these three functions:
void PyLineTable_InitAddressRange(const char *linetable, Py_ssize_t length, int
firstlineno, PyCodeAddressRange *range);
int PyLineTable_NextAddressRange(PyCodeAddressRange *range);
int PyLineTable_PreviousAddressRange
New submission from Mark Shannon :
Assuming that issue 45256 is implemented, we will need to document it.
I'm opening a separate issue, so this doesn't get lost in the midst of 45256.
We need to:
Document the changes to gdb. Possibly at
https://wiki.python.org/moin/DebuggingWithGdb
Change by Mark Shannon :
--
assignee: docs@python -> Mark.Shannon
___
Python tracker
<https://bugs.python.org/issue45317>
___
___
Python-bugs-list mai
Change by Mark Shannon :
--
nosy: +pablogsal
___
Python tracker
<https://bugs.python.org/issue45317>
___
___
Python-bugs-list mailing list
Unsubscribe:
Mark Shannon added the comment:
I strongly favor (b) over (d).
(d) adds more complexity to MAKE_FUNCTION.
MAKE_FUNCTION represents a measurable fraction of execution time for many
programs. The more flags and branches it has, the harder it is to optimize
Mark Shannon added the comment:
Since the docstring itself will always be present (attached to the function
object), removing a docstring from a co_consts tuple will only save one pointer
(8 bytes).
Given that, it would appear that (d) uses *more* memory than (b).
For the sqlalchemy
Mark Shannon added the comment:
127 and 48 aren't instructions.
>>> opcode.stack_effect(48)
Traceback (most recent call last):
File "", line 1, in
ValueError: invalid opcode or oparg
So the output from dis seems correct.
>If not, how would it deal with
Change by Mark Shannon :
--
pull_requests: +27070
pull_request: https://github.com/python/cpython/pull/28723
___
Python tracker
<https://bugs.python.org/issue43
Mark Shannon added the comment:
New changeset a7252f88d3fa33036bdd6036b8c97bc785ed6f17 by Mark Shannon in
branch 'main':
bpo-40116: Add insertion order bit-vector to dict values to allow dicts to
share keys more freely. (GH-28520)
https://github.com/python/cpython/commit
Change by Mark Shannon :
--
keywords: +patch
pull_requests: +27099
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/28755
___
Python tracker
<https://bugs.python.org/issu
New submission from Mark Shannon :
Python has two unconditional jumps, JUMP_ABSOLUTE and JUMP_FORWARD.
The bytecode compiler should ensure that all forward jumps use JUMP_FORWARD and
all backwards jumps use JUMP_ABSOLUTE.
That way, the interpreter will know that JUMP_ABSOLUTE jumps
Mark Shannon added the comment:
Yes, this is worth doing, IMO.
It adds no more code and probably reduces maintenance costs as any
improvements/bug-fixes to the rust/ruby versions can be easily ported.
Even if the benefit is small, the cost is basically zero.
--
nosy: +Mark.Shannon
Mark Shannon added the comment:
Sadly the MSVC team are claiming that this isn't a bug in their compiler.
Not sure how we convince them that it is. The website rejects any attempt to
reopen the issue.
How feasible would it be to use Clang or GCC on Windows
Change by Mark Shannon :
--
keywords: +patch
pull_requests: +27125
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/28802
___
Python tracker
<https://bugs.python.org/issu
New submission from Mark Shannon :
As the C API has evolved it has grown features in an ad-hoc way, driven by the
needs to whoever has bothered to add the code.
Maybe we should be a bit more principled about this. Specifically we should
make sure that there is a well defined interface
Mark Shannon added the comment:
This can be mitigated, if not entirely fixed, by storing an ordering bit vector
in the values.
This way all instances of the class SometimesShared in the example above can
share the keys.
The keys might be ("optional", "attr")
For any
Change by Mark Shannon :
--
keywords: +patch
pull_requests: +26911
stage: test needed -> patch review
pull_request: https://github.com/python/cpython/pull/28520
___
Python tracker
<https://bugs.python.org/issu
Mark Shannon added the comment:
The only other change of any obvious significance to _PyEval_EvalFrameDefault
since 3.10a7 are the changes to MATCH_MAPPING and MATCH_SEQUENCE and those make
_PyEval_EvalFrameDefault smaller.
We may need to look elsewhere for the remaining ~4% performance
Mark Shannon added the comment:
New changeset bd627eb7ed08a891dd1356756feb1ce2600358e4 by Mark Shannon in
branch 'main':
bpo-43760: Check for tracing using 'bitwise or' instead of branch in dispatch.
(GH-28723)
https://github.com/python/cpython/commit
Mark Shannon added the comment:
If some misses are caused by mixed int/float operands, it might be worth
investigating whether these occur in loops.
Most JIT compilers perform some sort of loop peeling to counter this form of
type instability.
E.g.
x = 0
for ...
x += some_float()
`x
Mark Shannon added the comment:
Experiments show that using `stride` just makes the code more complex,
`dk_kind` is sufficient.
We will still need ownership flags for split dicts, though.
A single flag may suffice.
--
___
Python tracker
<ht
New submission from Mark Shannon :
A "Normal" Python objects is conceptually just a pair of pointers, one to the
class, and one to the dictionary.
With shared keys, the dictionary is redundant as it is no more than a pair of
pointers, one to the keys and one to the values.
Change by Mark Shannon :
--
keywords: +patch
pull_requests: +27439
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/29165
___
Python tracker
<https://bugs.python.org/issu
New submission from Mark Shannon :
We have multiple freelists for performance, but they are adhoc and poorly
integrated with the underlying allocator.
Improving this should give us a decent speedup.
--
assignee: Mark.Shannon
components: Interpreter Core
messages: 404788
nosy
Mark Shannon added the comment:
What is `source`?
--
___
Python tracker
<https://bugs.python.org/issue45563>
___
___
Python-bugs-list mailing list
Unsubscribe:
Mark Shannon added the comment:
New changeset 299483c95d601ddcfdce2f96418b6499c1fc7b9f by Mark Shannon in
branch 'main':
bpo-45963: Make space for the InterpreterFrame of a generator in that
generator. (GH-29891)
https://github.com/python/cpython/commit
Change by Mark Shannon :
--
pull_requests: +28167
pull_request: https://github.com/python/cpython/pull/29942
___
Python tracker
<https://bugs.python.org/issue44
Mark Shannon added the comment:
New changeset 396b58345f81d4c8c5a52546d2288e666a1b9b8b by Irit Katriel in
branch 'main':
bpo-45711: Remove type and traceback from exc_info (GH-30122)
https://github.com/python/cpython/commit/396b58345f81d4c8c5a52546d2288e666a1b9b8b
Change by Mark Shannon :
--
pull_requests: +28386
pull_request: https://github.com/python/cpython/pull/30169
___
Python tracker
<https://bugs.python.org/issue46
Mark Shannon added the comment:
New changeset efd6236d36b292c2c43540132c87cf8425e8d627 by Mark Shannon in
branch 'main':
bpo-46072: Add top level stats struct (GH-30169)
https://github.com/python/cpython/commit/efd6236d36b292c2c43540132c87cf8425e8d627
Mark Shannon added the comment:
New changeset 7537f6008704b20e2d04a7ef1c0cfa34121cc5eb by Dennis Sweeney in
branch 'main':
bpo-45609: More specialization stats for STORE_SUBSCR (GH-30193)
https://github.com/python/cpython/commit/7537f6008704b20e2d04a7ef1c0cfa34121cc5eb
Mark Shannon added the comment:
Yes, most of it :)
We haven't implemented points 2 and 3, yet.
I'm in no hurry to implement 3. It would clean up `gen.throw` a lot, and break
the dependency between that code and the interpreter, but it isn't urgent.
2 is more urgent. I think we need
Change by Mark Shannon :
--
pull_requests: +28621
pull_request: https://github.com/python/cpython/pull/30415
___
Python tracker
<https://bugs.python.org/issue44
Mark Shannon added the comment:
New changeset 332e6b972567debfa9d8f3f9a4a966c7ad15eec9 by Brandt Bucher in
branch 'main':
bpo-45256: Don't track the exact depth of each `InterpreterFrame` (GH-30372)
https://github.com/python/cpython/commit/332e6b972567debfa9d8f3f9a4a966c7ad15eec9
Mark Shannon added the comment:
See https://github.com/faster-cpython/ideas/discussions/210
--
___
Python tracker
<https://bugs.python.org/issue44525>
___
___
Change by Mark Shannon :
--
keywords: +patch
pull_requests: +28578
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/30364
___
Python tracker
<https://bugs.python.org/issu
Mark Shannon added the comment:
New changeset a94461d7189d7f1147ab304a332c8684263dc17e by Irit Katriel in
branch 'main':
bpo-46202: Remove opcode POP_EXCEPT_AND_RERAISE (GH-30302)
https://github.com/python/cpython/commit/a94461d7189d7f1147ab304a332c8684263dc17e
--
nosy
Mark Shannon added the comment:
New changeset 135cabd328504e1648d17242b42b675cdbd0193b by Mark Shannon in
branch 'main':
bpo-44525: Copy free variables in bytecode to allow calls to inner functions to
be specialized (GH-29595)
https://github.com/python/cpython/commit
Change by Mark Shannon :
--
keywords: +patch
pull_requests: +27966
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/29729
___
Python tracker
<https://bugs.python.org/issu
Mark Shannon added the comment:
> I assume there's something wrong with the OP's methodology for profiling.
In a word "cProfile".
All cProfile is doing is measuring the overhead of cProfile.
That the overhead of cProfile has gone up is not surprising. That it has gone
up so m
Change by Mark Shannon :
--
keywords: +patch
pull_requests: +27835
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/29592
___
Python tracker
<https://bugs.python.org/issu
New submission from Mark Shannon :
We can remove the C stack use and general overhead of calling special methods
implemented in Python for attribute access and indexing.
Each operation has a special method that implements it. When that special
method is implemented in Python, we should avoid
Mark Shannon added the comment:
https://bugs.python.org/issue45829 is the related issue for special methods
--
___
Python tracker
<https://bugs.python.org/issue45
Mark Shannon added the comment:
New changeset 036fead695a9a1e1082992d16ab46bca1cd61a25 by Dennis Sweeney in
branch 'main':
bpo-45609: Specialize STORE_SUBSCR (GH-29242)
https://github.com/python/cpython/commit/036fead695a9a1e1082992d16ab46bca1cd61a25
--
nosy: +Mark.Shannon
Change by Mark Shannon :
--
pull_requests: +27838
pull_request: https://github.com/python/cpython/pull/29595
___
Python tracker
<https://bugs.python.org/issue44
Mark Shannon added the comment:
I don't think it matter much which we do first.
I happened to do BINARY_SUBSCR first.
--
___
Python tracker
<https://bugs.python.org/issue45
Mark Shannon added the comment:
New changeset 337cb480e9dc1d27594ebd87a0045d00ec8b1c3a by Mark Shannon in
branch 'main':
bpo-45709: Fix tracing when exception is handled. (GH-29638)
https://github.com/python/cpython/commit/337cb480e9dc1d27594ebd87a0045d00ec8b1c3a
Change by Mark Shannon :
--
keywords: +patch
pull_requests: +27869
stage: needs patch -> patch review
pull_request: https://github.com/python/cpython/pull/29638
___
Python tracker
<https://bugs.python.org/issu
Mark Shannon added the comment:
Sorry about the delay in fixing this.
--
keywords: -patch
stage: patch review -> needs patch
___
Python tracker
<https://bugs.python.org/issu
Change by Mark Shannon :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Change by Mark Shannon :
--
keywords: +patch
pull_requests: +27871
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/29640
___
Python tracker
<https://bugs.python.org/issu
New submission from Mark Shannon :
We exiting a frame (returning from a Python function) we have to release the
stack allocated frame. If a heap-allocated frame object exists, we need to copy
the contents of the (stack) frame into the frame object.
However, this involves allocating memory
Mark Shannon added the comment:
Ok, so it is not as bad as I thought.
A failed allocation might leave us with an invalid frameobject, though. So it
is still worth fixing.
--
___
Python tracker
<https://bugs.python.org/issue45
Change by Mark Shannon :
--
pull_requests: +27774
pull_request: https://github.com/python/cpython/pull/29524
___
Python tracker
<https://bugs.python.org/issue45
Change by Mark Shannon :
--
keywords: +patch
pull_requests: +27768
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/29516
___
Python tracker
<https://bugs.python.org/issu
Mark Shannon added the comment:
New changeset 4cdeee5978ee3f8ea7fe95172ae04d866cd88177 by Irit Katriel in
branch 'main':
bpo-45711: remove unnecessary DUP_TOP and POP in exception handling (GH-29495)
https://github.com/python/cpython/commit/4cdeee5978ee3f8ea7fe95172ae04d866cd88177
801 - 900 of 1194 matches
Mail list logo