[issue44890] Enable specialization stats collection when in Py_DEBUG

2021-08-12 Thread Mark Shannon
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

[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

[issue44725] Expose specialization stats in python

2021-07-29 Thread Mark Shannon
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

[issue44206] Add a version number to dict keys.

2021-08-02 Thread Mark Shannon
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__',

[issue44206] Add a version number to dict keys.

2021-08-02 Thread Mark Shannon
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

[issue44821] Instance dictionaries should be created eagerly

2021-08-04 Thread Mark Shannon
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

[issue44821] Instance dictionaries should be created eagerly

2021-08-04 Thread Mark Shannon
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

[issue44826] Specialize STORE_ATTR using PEP 659 machinery.

2021-08-04 Thread Mark Shannon
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

[issue44821] Instance dictionaries should be created eagerly

2021-08-04 Thread Mark Shannon
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

[issue44772] Regression in memory use of instances due to dictionary ordering

2021-08-04 Thread Mark Shannon
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

[issue44826] Specialize STORE_ATTR using PEP 659 machinery.

2021-08-04 Thread Mark Shannon
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

[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 <https://bugs.python.org/issue44

[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

[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 <https://bugs.python.org/issue44

[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

[issue45256] Remove the usage of the C stack in Python to Python calls

2021-09-23 Thread Mark Shannon
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

[issue43760] The DISPATCH() macro is not as efficient as it could be (move PyThreadState.use_tracing)

2021-09-20 Thread Mark Shannon
Change by Mark Shannon : -- pull_requests: +26872 pull_request: https://github.com/python/cpython/pull/28474 ___ Python tracker <https://bugs.python.org/issue43

[issue45116] Performance regression 3.10b1 and later on Windows: Py_DECREF() not inlined in PGO build

2021-09-20 Thread Mark Shannon
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

[issue45116] Performance regression 3.10b1 and later on Windows: Py_DECREF() not inlined in PGO build

2021-09-20 Thread Mark Shannon
Change by Mark Shannon : -- pull_requests: +26873 pull_request: https://github.com/python/cpython/pull/28475 ___ Python tracker <https://bugs.python.org/issue45

[issue43760] The DISPATCH() macro is not as efficient as it could be (move PyThreadState.use_tracing)

2021-09-20 Thread Mark Shannon
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

[issue40116] Regression in memory use of shared key dictionaries for "compact dicts"

2021-09-23 Thread Mark Shannon
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

[issue45388] Use JUMP_FORWARD for all forward jumps.

2021-10-09 Thread Mark Shannon
Change by Mark Shannon : -- pull_requests: +27145 pull_request: https://github.com/python/cpython/pull/28829 ___ Python tracker <https://bugs.python.org/issue45

[issue45247] [C API] Add explicit support for Cython to the C API

2021-10-13 Thread Mark Shannon
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

[issue45256] Remove the usage of the C stack in Python to Python calls

2021-10-13 Thread Mark Shannon
Change by Mark Shannon : -- pull_requests: +27226 pull_request: https://github.com/python/cpython/pull/28937 ___ Python tracker <https://bugs.python.org/issue45

[issue45340] Lazily create dictionaries for plain Python objects

2021-10-13 Thread Mark Shannon
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

[issue45256] Remove the usage of the C stack in Python to Python calls

2021-10-13 Thread Mark Shannon
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

[issue45340] Lazily create dictionaries for plain Python objects

2021-10-12 Thread Mark Shannon
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

[issue45550] Increase the information content and robustness of tp_version_tag.

2021-10-21 Thread Mark Shannon
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

[issue45367] Specialize BINARY_MULTIPLY

2021-10-14 Thread Mark Shannon
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

[issue45527] Reduce overhead for cache hits in specialized opcodes.

2021-10-19 Thread Mark Shannon
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

[issue45527] Reduce overhead for cache hits in specialized opcodes.

2021-10-19 Thread Mark Shannon
Change by Mark Shannon : -- nosy: +kj ___ Python tracker <https://bugs.python.org/issue45527> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue44525] Implement CALL_FUNCTION adaptive interpreter optimizations

2021-10-19 Thread Mark Shannon
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

[issue44525] Implement CALL_FUNCTION adaptive interpreter optimizations

2021-10-20 Thread Mark Shannon
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

[issue44525] Implement CALL_FUNCTION adaptive interpreter optimizations

2021-10-20 Thread Mark Shannon
Change by Mark Shannon : -- pull_requests: +27355 pull_request: https://github.com/python/cpython/pull/29033 ___ Python tracker <https://bugs.python.org/issue44

[issue45340] Lazily create dictionaries for plain Python objects

2021-10-20 Thread Mark Shannon
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

[issue45527] Reduce overhead for cache hits in specialized opcodes.

2021-10-20 Thread Mark Shannon
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

[issue45415] Assert oparg < INSTR_OFFSET()

2021-10-08 Thread Mark Shannon
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

[issue45430] PEP 523 no longer works

2021-10-11 Thread Mark Shannon
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

[issue45430] PEP 523 no longer works

2021-10-11 Thread Mark Shannon
Change by Mark Shannon : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue45431] [C API] Rename CFrame or hide it to only export names starting with Py

2021-10-11 Thread Mark Shannon
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

[issue45430] PEP 523 no longer works

2021-10-11 Thread Mark Shannon
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

[issue45256] Remove the usage of the C stack in Python to Python calls

2021-10-18 Thread Mark Shannon
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

[issue45256] Remove the usage of the C stack in Python to Python calls

2021-09-28 Thread Mark Shannon
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

[issue36521] Consider removing docstrings from co_consts in code objects

2021-09-29 Thread Mark Shannon
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

[issue45316] [C API] Functions not exported with PyAPI_FUNC()

2021-09-29 Thread Mark Shannon
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

[issue45317] Document the removal the usage of the C stack in Python to Python calls

2021-09-29 Thread Mark Shannon
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

[issue45317] Document the removal the usage of the C stack in Python to Python calls

2021-09-29 Thread Mark Shannon
Change by Mark Shannon : -- assignee: docs@python -> Mark.Shannon ___ Python tracker <https://bugs.python.org/issue45317> ___ ___ Python-bugs-list mai

[issue45317] Document the removal the usage of the C stack in Python to Python calls

2021-09-29 Thread Mark Shannon
Change by Mark Shannon : -- nosy: +pablogsal ___ Python tracker <https://bugs.python.org/issue45317> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue36521] Consider removing docstrings from co_consts in code objects

2021-09-30 Thread Mark Shannon
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

[issue36521] Consider removing docstrings from co_consts in code objects

2021-09-30 Thread Mark Shannon
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

[issue45362] dis does not work with the new optimized ops

2021-10-04 Thread Mark Shannon
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

[issue43760] The DISPATCH() macro is not as efficient as it could be (move PyThreadState.use_tracing)

2021-10-04 Thread Mark Shannon
Change by Mark Shannon : -- pull_requests: +27070 pull_request: https://github.com/python/cpython/pull/28723 ___ Python tracker <https://bugs.python.org/issue43

[issue40116] Regression in memory use of shared key dictionaries for "compact dicts"

2021-10-06 Thread Mark Shannon
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

[issue45388] Use JUMP_FORWARD for all forward jumps.

2021-10-06 Thread Mark Shannon
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

[issue45388] Use JUMP_FORWARD for all forward jumps.

2021-10-06 Thread Mark Shannon
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

[issue29410] Moving to SipHash-1-3

2021-10-07 Thread Mark Shannon
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

[issue45116] Performance regression 3.10b1 and later on Windows: Py_DECREF() not inlined in PGO build

2021-10-07 Thread 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

[issue45340] Lazily create dictionaries for plain Python objects

2021-10-07 Thread Mark Shannon
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

[issue45247] Add explicit support for Cython to the C API.

2021-09-20 Thread Mark Shannon
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

[issue40116] Regression in memory use of shared key dictionaries for "compact dicts"

2021-09-22 Thread Mark Shannon
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

[issue40116] Regression in memory use of shared key dictionaries for "compact dicts"

2021-09-22 Thread Mark Shannon
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

[issue45116] Performance regression 3.10b1 and later on Windows: Py_DECREF() not inlined in PGO build

2021-09-21 Thread Mark Shannon
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

[issue43760] The DISPATCH() macro is not as efficient as it could be (move PyThreadState.use_tracing)

2021-10-05 Thread Mark Shannon
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

[issue45367] Specialize BINARY_MULTIPLY

2021-10-06 Thread Mark Shannon
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

[issue45233] Allow split key dictionaries with values owned by other objects.

2021-09-21 Thread Mark Shannon
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

[issue45340] Lazily create dictionaries for plain Python objects

2021-10-01 Thread Mark Shannon
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.

[issue45575] Use a more principled approach to freelists

2021-10-22 Thread Mark Shannon
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

[issue45575] Use a more principled approach to freelists

2021-10-22 Thread Mark Shannon
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

[issue45563] inspect.getframeinfo() doesn't handle frames without lineno

2021-10-22 Thread Mark Shannon
Mark Shannon added the comment: What is `source`? -- ___ Python tracker <https://bugs.python.org/issue45563> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue45963] Embed interpreter frame in generator.

2021-12-06 Thread Mark Shannon
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

[issue44525] Implement CALL_FUNCTION adaptive interpreter optimizations

2021-12-06 Thread Mark Shannon
Change by Mark Shannon : -- pull_requests: +28167 pull_request: https://github.com/python/cpython/pull/29942 ___ Python tracker <https://bugs.python.org/issue44

[issue45711] Simplify the interpreter's (type, val, tb) exception representation

2021-12-17 Thread Mark Shannon
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

[issue46072] Unify handling of stats in the CPython VM

2021-12-17 Thread Mark Shannon
Change by Mark Shannon : -- pull_requests: +28386 pull_request: https://github.com/python/cpython/pull/30169 ___ Python tracker <https://bugs.python.org/issue46

[issue46072] Unify handling of stats in the CPython VM

2021-12-17 Thread Mark Shannon
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

[issue45609] Specialize STORE_SUBSCR

2022-01-04 Thread Mark Shannon
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

[issue43683] Handle generator (and coroutine) state in the bytecode.

2022-01-05 Thread Mark Shannon
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

[issue44525] Implement CALL_FUNCTION adaptive interpreter optimizations

2022-01-05 Thread Mark Shannon
Change by Mark Shannon : -- pull_requests: +28621 pull_request: https://github.com/python/cpython/pull/30415 ___ Python tracker <https://bugs.python.org/issue44

[issue45256] Remove the usage of the C stack in Python to Python calls

2022-01-05 Thread Mark Shannon
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

[issue44525] Implement CALL_FUNCTION adaptive interpreter optimizations

2022-01-05 Thread Mark Shannon
Mark Shannon added the comment: See https://github.com/faster-cpython/ideas/discussions/210 -- ___ Python tracker <https://bugs.python.org/issue44525> ___ ___

[issue45923] Improve performance of sys.settracing based tools.

2022-01-03 Thread Mark Shannon
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

[issue46202] remove opcode POP_EXCEPT_AND_RERAISE

2022-01-04 Thread Mark Shannon
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

[issue44525] Implement CALL_FUNCTION adaptive interpreter optimizations

2021-11-23 Thread Mark Shannon
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

[issue45786] Avoid allocating when exiting frame; it may be unsafe.

2021-11-23 Thread Mark Shannon
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

[issue45880] Performance regression of Int object operators. (Python 3.11)

2021-11-23 Thread Mark Shannon
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

[issue45829] Remove C stack use by specializing BINARY_SUBSCR, STORE_SUBSCR, LOAD_ATTR, and STORE_ATTR

2021-11-17 Thread Mark Shannon
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

[issue45829] Remove C stack use by specializing BINARY_SUBSCR, STORE_SUBSCR, LOAD_ATTR, and STORE_ATTR

2021-11-17 Thread Mark Shannon
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

[issue45256] Remove the usage of the C stack in Python to Python calls

2021-11-17 Thread Mark Shannon
Mark Shannon added the comment: https://bugs.python.org/issue45829 is the related issue for special methods -- ___ Python tracker <https://bugs.python.org/issue45

[issue45609] Specialize STORE_SUBSCR

2021-11-19 Thread Mark Shannon
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

[issue44525] Implement CALL_FUNCTION adaptive interpreter optimizations

2021-11-17 Thread 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

[issue45829] Remove C stack use by specializing BINARY_SUBSCR, STORE_SUBSCR, LOAD_ATTR, and STORE_ATTR

2021-11-17 Thread Mark Shannon
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

[issue45709] 3.11 regression: tracing with-statement on exit from block

2021-11-19 Thread Mark Shannon
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

[issue45709] 3.11 regression: tracing with-statement on exit from block

2021-11-19 Thread Mark Shannon
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

[issue45709] 3.11 regression: tracing with-statement on exit from block

2021-11-19 Thread Mark Shannon
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

[issue45636] Merge BINARY_*/INPLACE_* into BINARY_OP

2021-11-19 Thread Mark Shannon
Change by Mark Shannon : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue45806] Cannot Recover From StackOverflow in 3.9 Tests

2021-11-19 Thread Mark Shannon
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

[issue45786] Avoid allocating when exiting frame; it may be unsafe.

2021-11-11 Thread Mark Shannon
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

[issue45786] Avoid allocating when exiting frame; it may be unsafe.

2021-11-11 Thread Mark Shannon
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

[issue45753] Further speed up Python-to-Python calls.

2021-11-11 Thread Mark Shannon
Change by Mark Shannon : -- pull_requests: +27774 pull_request: https://github.com/python/cpython/pull/29524 ___ Python tracker <https://bugs.python.org/issue45

[issue45753] Further speed up Python-to-Python calls.

2021-11-10 Thread Mark Shannon
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

[issue45711] Simplify the interpreter's (type, val, tb) exception representation

2021-11-10 Thread Mark Shannon
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

<    4   5   6   7   8   9   10   11   12   >