Change by Mark Shannon :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Change by Mark Shannon :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
type: -> performance
___
Python tracker
<https://bugs.python
Change by Mark Shannon :
--
pull_requests: +26193
pull_request: https://github.com/python/cpython/pull/27708
___
Python tracker
<https://bugs.python.org/issue44
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.
--
ass
Change by Mark Shannon :
--
keywords: +patch
pull_requests: +26199
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/27715
___
Python tracker
<https://bugs.python.org/issu
Change by Mark Shannon :
--
pull_requests: +26205
pull_request: https://github.com/python/cpython/pull/27725
___
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/3f3d5dcac336463bd0eed64ba0bd76
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 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/cpyt
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 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/a530a9538f3f444bebd2d2b71fe5f2
Change by Mark Shannon :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
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
-
New submission from Mark Shannon :
PEP 659 quickening provides a mechanism for replacing instructions.
We should exploit this to implement superinstructions when quickening.
See https://github.com/faster-cpython/ideas/issues/16
--
messages: 399444
nosy: Mark.Shannon
priority: normal
Change by Mark Shannon :
--
keywords: +patch
pull_requests: +26220
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/27741
___
Python tracker
<https://bugs.python.org/issu
Mark Shannon added the comment:
I believe this to be fixed.
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Mark Shannon added the comment:
Ned, is this still an issue with the release candidate of 3.10?
--
___
Python tracker
<https://bugs.python.org/issue44
Mark Shannon added the comment:
I'd like to close this, as the exception handling is all done and working
correctly.
Is there a separate issue for how we are handling CodeType()?
--
___
Python tracker
<https://bugs.python.org/is
Mark Shannon added the comment:
I guess this will be resolved when the great PEP 563/649 debate is concluded.
No need for another issue.
--
resolution: -> duplicate
stage: patch review -> resolved
status: open -> closed
___
Python tracke
Change by Mark Shannon :
--
resolution: -> out of date
stage: -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Mark Shannon added the comment:
Duplicate of https://bugs.python.org/issue40116
--
resolution: -> duplicate
stage: -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Change by Mark Shannon :
--
nosy: +rhettinger
___
Python tracker
<https://bugs.python.org/issue40116>
___
___
Python-bugs-list mailing list
Unsubscribe:
Mark Shannon added the comment:
This looks like a duplicate of https://bugs.python.org/issue42951
--
nosy: +Mark.Shannon
___
Python tracker
<https://bugs.python.org/issue44
Mark Shannon added the comment:
A recursion limit of 30 is effectively infinite.
With a debug build of 3.11, the time to execute grows very fast indeed,
probably super-exponentially.
mark@nero:~/repos/cpython$ time ./python ~/test/test.py 15
real0m1.107s
user0m1.099s
sys
Mark Shannon added the comment:
Thanks for putting in the effort to find this.
I think the first step to fixing this is to formalize the semantics of
`tp_version_tag`. Initially it was designed just for the method cache, but we
have started using it as a unique identifier for the state of a
Change by Mark Shannon :
--
keywords: +patch
pull_requests: +26247
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/27773
___
Python tracker
<https://bugs.python.org/issu
Mark Shannon added the comment:
PyType_ClearCache() is documented as:
Clear the internal lookup cache. Return the current version tag.
Modifying it to do what it is documented to do fixes this bug :)
--
___
Python tracker
<ht
Change by Mark Shannon :
--
resolution: -> duplicate
stage: needs patch -> resolved
status: open -> closed
superseder: -> tp_version_tag is not unique when test runs with -R :
___
Python tracker
<https://bugs.python
Mark Shannon added the comment:
New changeset 1a511dc92dd10ee8fc2e5da9f52f795924bdc89a by Mark Shannon in
branch 'main':
bpo-44914: Maintain invariants of type version tags. (GH-27773)
https://github.com/python/cpython/commit/1a511dc92dd10ee8fc2e5da9f52f79
Mark Shannon added the comment:
New changeset 4f51fa9e2d3ea9316e674fb9a9f3e3112e83661c by Mark Shannon in
branch 'main':
bpo-44900: Add five superinstructions. (GH-27741)
https://github.com/python/cpython/commit/4f51fa9e2d3ea9316e674fb9a9f3e3
Change by Mark Shannon :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Mark Shannon added the comment:
New changeset d84d2c4985457733602d46dc4ee77290da4e9539 by Ken Jin in branch
'main':
bpo-44914: Add tests for some invariants of tp_version_tag (GH-27774)
https://github.com/python/cpython/commit/d84d2c4985457733602d46dc4ee772
Mark Shannon added the comment:
New changeset 96346cb6d0593ef9ec122614347ccb053cd63433 by Ken Jin in branch
'main':
bpo-44889: Specialize LOAD_METHOD with PEP 659 adaptive interpreter (GH-27722)
https://github.com/python/cpython/commit/96346cb6d0593ef9ec122614347ccb
Mark Shannon added the comment:
refleak.py seems to run forever for me. Got bored after 6000 iterations.
Which O/S and configure options are needed for refleak.py to fail?
--
___
Python tracker
<https://bugs.python.org/issue44
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
New submission from Mark Shannon :
Specializing BINARY_ADD is worthwhile for two reasons:
Specializing for ints, floats and strings may give us some small speedup.
It removes the complex checks for the special case of extending a string, `s =
s + ...` from the normal instruction to a
New submission from Mark Shannon :
"Medium" integers are those with a single internal digit or zero.
Medium integers are integers in the range -2**30 to +2**30 on 64 bit machines.
"Small" integers, -5 to 256 are cached, but are represented as medium integers
in
Mark Shannon added the comment:
Just changes to longobject.c.
There are still various minor inefficiencies in testing to see whether an int
is a medium value, and then throwing away size information before creating
result objects.
I'm not expecting this to make much difference, but
Mark Shannon added the comment:
If the problem is that methodcaller is not faster than a lambda, then why not
use a lambda?
Lambdas are just Python functions and calling them will get faster.
We aren't going to spend time optimizing calls to methodcaller, so you might as
well use a l
Change by Mark Shannon :
--
keywords: +patch
pull_requests: +26296
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/27832
___
Python tracker
<https://bugs.python.org/issu
Mark Shannon added the comment:
It is not `PyCode_Addr2Line()` that has changed, but `frame->f_lasti`.
If you call
`PyCode_Addr2Line(frame->f_code, 8)` in 3.9
you get the same behavior as calling
`PyCode_Addr2Line(frame->f_code, 8)` in 3.10.
Assuming the bytecode is unchan
New submission from Mark Shannon :
The two plausible layouts from evaluation stack frames are described here:
https://github.com/faster-cpython/ideas/issues/31#issuecomment-844263795
We opted for layout A, although it is a bit more complex to manage and slightly
more expensive in terms of
Change by Mark Shannon :
--
keywords: +patch
pull_requests: +26382
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/27933
___
Python tracker
<https://bugs.python.org/issu
Mark Shannon added the comment:
New changeset f9242d50b18572ef0d584a1c815ed08d1a38e4f4 by Mark Shannon in
branch 'main':
bpo-44990: Change layout of evaluation frames. "Layout B" (GH-27933)
https://github.com/python/cpython/commit/f9242d50b18572ef0d58
Mark Shannon added the comment:
New changeset 15d50d7ed8afd3ab26b00210b5b4feaaadd5af51 by Mark Shannon in
branch 'main':
bpo-44946: Streamline operators and creation of ints for common case of single
'digit'. (GH-27832)
https://github.com/p
Change by Mark Shannon :
--
keywords: +patch
pull_requests: +26414
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/27967
___
Python tracker
<https://bugs.python.org/issu
Mark Shannon added the comment:
No significant change in performance
https://gist.github.com/markshannon/34a780d65e69b5a573a83f3fdb0139aa
I think this merely indicates that there are little to no f-strings in the
pyperformance benchmark suite
Change by Mark Shannon :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Change by Mark Shannon :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Mark Shannon added the comment:
New changeset d3eaf0cc5b311ad023fd13e367f817d528403306 by Mark Shannon in
branch 'main':
bpo-44945: Specialize BINARY_ADD (GH-27967)
https://github.com/python/cpython/commit/d3eaf0cc5b311ad023fd13e367f817
Change by Mark Shannon :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Change by Mark Shannon :
--
stage: resolved ->
___
Python tracker
<https://bugs.python.org/issue44945>
___
___
Python-bugs-list mailing list
Unsubscrib
Change by Mark Shannon :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Mark Shannon added the comment:
I don't recall, but...
You can't modify any builtin modules. Freezing modules effectively makes them
builtin from a user's perspective. There are plenty of modules that can't be
modified:
>>> sys.builtin_module_names
('_abc&
Change by Mark Shannon :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Mark Shannon added the comment:
New changeset c2f1e953371c25f6c42b599ba3d8797effbb503e by Irit Katriel in
branch 'main':
bpo-45152: Add HAS_CONST macro and get_const_value() function and use⦠(#28262)
https://github.com/python/cpython/commit/c2f1e953371c25f6c42b599ba3d879
New submission from Mark Shannon :
The stats for BINARY_SUBSCR and to a lesser amount LOAD_METHOD don't tell us
much about what isn't being specialized.
We should refine the stats to give us a better idea of what to optimize for.
--
assignee: Mark.Shannon
components: Interp
Change by Mark Shannon :
--
keywords: +patch
pull_requests: +26766
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/28352
___
Python tracker
<https://bugs.python.org/issu
Mark Shannon added the comment:
New changeset 11cdf2a6702639571554cbf3f69f57d688564540 by Mark Shannon in
branch 'main':
bpo-45203: Cleanup stats gathering code for LOAD_METHOD (GH-28352)
https://github.com/python/cpython/commit/11cdf2a6702639571554cbf3f69f57
New submission from Mark Shannon :
Specialization and other optimizations rely on shared dictionary key properties
(version number, no deletions, etc).
However checking those properties during specialization is tricky and rather
clunky as the dict-keys can only be tested indirectly through a
Change by Mark Shannon :
--
keywords: +patch
pull_requests: +26802
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/28389
___
Python tracker
<https://bugs.python.org/issu
Mark Shannon added the comment:
New changeset 064464fc38269e70f7e3a34cb25fc9085ab85782 by Mark Shannon in
branch 'main':
bpo-45219: Factor dictkey indexing (GH-28389)
https://github.com/python/cpython/commit/064464fc38269e70f7e3a34cb25fc9
Change by Mark Shannon :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
New submission from Mark Shannon :
Currently, if a dictionary is split, then the dictionary owns the memory for
the values. Unless the values is the unique empty-values array.
In order to support lazily created dictionaries for objects (see
https://github.com/faster-cpython/ideas/issues/72
Mark Shannon added the comment:
An alternative placement for the flag bits:
Stride bits in the dictkeys.
Ownership bits in the low bits of ma_used.
This would still allow us to remove the version tag at some point.
--
___
Python tracker
<ht
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:
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 to the
Change by Mark Shannon :
--
pull_requests: +26872
pull_request: https://github.com/python/cpython/pull/28474
___
Python tracker
<https://bugs.python.org/issue43
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:
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 to be the
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:
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
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:
I've trying to do this since about 2011 :)
--
___
Python tracker
<https://bugs.python.org/issue45256>
___
___
Python-bugs-l
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 the
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.
--
___
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 fo
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/DebuggingWith
Change by Mark Shannon :
--
nosy: +pablogsal
___
Python tracker
<https://bugs.python.org/issue45317>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Mark Shannon :
--
assignee: docs@python -> Mark.Shannon
___
Python tracker
<https://bugs.python.org/issue45317>
___
___
Python-bugs-list mai
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
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.
B
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 c
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 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/p
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
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 are
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
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/cpyt
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 Wi
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
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
Change by Mark Shannon :
--
pull_requests: +27145
pull_request: https://github.com/python/cpython/pull/28829
___
Python tracker
<https://bugs.python.org/issue45
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 :
--
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:
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 i
501 - 600 of 1219 matches
Mail list logo