[issue45637] The fallback to find the current frame in the gdb helpers fails for inlined frames

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

[issue45636] Merge BINARY_*/INPLACE_* into BINARY_OP/INPLACE_OP

2021-10-28 Thread Mark Shannon
Mark Shannon added the comment: Do you have results for pyperformance? -- ___ Python tracker <https://bugs.python.org/issue45636> ___ ___ Python-bugs-list mailin

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

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

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

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

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

2021-10-27 Thread Mark Shannon
Mark Shannon added the comment: Just to be clear, it is the behavior change that should be reverted, not necessarily the new bytecode. In fact we should probably push on with (2) and add an exception handler wrapping the whole generator except the GEN_START. That way a GEN_START exception

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

2021-10-27 Thread Mark Shannon
Change by Mark Shannon : -- priority: normal -> release blocker ___ Python tracker <https://bugs.python.org/issue43683> ___ ___ Python-bugs-list mai

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

2021-10-27 Thread Mark Shannon
Mark Shannon added the comment: Damien, thanks for catching this. The change was not intended. There are two kind of exceptions raised by send. 1. Where a pre-condition is not met, e.g. a generator is already ruuning (caller errors) 2. When the generator/coroutine raises an exception

[issue45388] Use JUMP_FORWARD for all forward jumps.

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

[issue44511] Improve the bytecode for mapping patterns

2021-10-27 Thread Mark Shannon
Mark Shannon added the comment: New changeset 82a662e5216a9b3969054c540a759a9493468510 by Brandt Bucher in branch 'main': bpo-44511: Improve the bytecode for class and mapping patterns (GH-26922) https://github.com/python/cpython/commit/82a662e5216a9b3969054c540a759a9493468510

[issue40512] [subinterpreters] Meta issue: per-interpreter GIL

2021-10-26 Thread Mark Shannon
Change by Mark Shannon : -- nosy: +Mark.Shannon nosy_count: 9.0 -> 10.0 pull_requests: +27492 stage: -> patch review pull_request: https://github.com/python/cpython/pull/29228 ___ Python tracker <https://bugs.python.org/i

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

2021-10-22 Thread Mark Shannon
Mark Shannon added the comment: If I knew where to look, I would be looking myself :) Is the frozen module one built into CPython or one you have generated? -- ___ Python tracker <https://bugs.python.org/issue45

[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

[issue45555] Object stays alive for weak reference if an exception happens in constructor

2021-10-22 Thread Mark Dickinson
Mark Dickinson added the comment: I don't think this is a bug: there's still a reference to the `A` instance in `sys.exc_info()` (specifically, in the exception traceback) in this case, so that instance is still alive. If you add an `except: pass` clause to your `try / finally`, you should

[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:

[issue45569] Drop support for 15-bit PyLong digits?

2021-10-22 Thread Mark Dickinson
New submission from Mark Dickinson : Looking at issue #35037 (which is a compatibility issue having to do with PYLONG_BITS_IN_DIGIT), I'm wondering whether it would make sense to drop support for 15-bit PyLong digits altogether. This would simplify some of the code, eliminate a configuration

[issue35037] PYLONG_BITS_IN_DIGIT differs between MinGW and MSVC

2021-10-22 Thread Mark Dickinson
Mark Dickinson added the comment: This should probably be a separate issue, but I wonder whether the 15-bit digit option has value any more. Should we just drop that option and always use 30-bit digits? 30-bit digits were introduced at a time when we couldn't rely on a 64-bit integer type

[issue15996] pow() for complex numbers is rough around the edges

2021-10-22 Thread Mark Dickinson
Mark Dickinson added the comment: See also discussion in #44970, which is closed as a duplicate of this issue. -- ___ Python tracker <https://bugs.python.org/issue15

[issue44970] Re-examine complex pow special case handling

2021-10-22 Thread Mark Dickinson
Mark Dickinson added the comment: > Is not it a duplicate of issue15996? Yes, I think it's close enough. Thanks. -- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> pow() for complex numbers is rough a

[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

[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

[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

[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

[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

[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:

[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

[issue25934] ICC compiler: ICC treats denormal floating point numbers as 0.0

2021-10-19 Thread Mark Dickinson
Mark Dickinson added the comment: > Closing this as out of date. SGTM. Thanks. -- ___ Python tracker <https://bugs.python.org/issue25934> ___ ___ Python-

[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

[issue45476] [C API] Convert "AS" functions, like PyFloat_AS_DOUBLE(), to static inline functions

2021-10-15 Thread Mark Dickinson
Change by Mark Dickinson : -- nosy: +mark.dickinson ___ Python tracker <https://bugs.python.org/issue45476> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue45480] Missing link(s) to the "Python Module Index" page

2021-10-15 Thread Mark Summerfield
New submission from Mark Summerfield : I mostly use the Python 3.8 docs since that's the Python I use. However, when I tried using the 3.9 and 3.10 docs I found that the top of each page has a long search bar (presumably for mobile devices?) but _no_ link to the python module index. I find

[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

[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

[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-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

[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

[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

[issue45412] [C API] Remove Py_OVERFLOWED(), Py_SET_ERRNO_ON_MATH_ERROR(), Py_ADJUST_ERANGE1()

2021-10-11 Thread Mark Dickinson
Mark Dickinson added the comment: +1 for the removals. (We should fix #44970 too, but as you say that's a separate issue. And I suspect that the Py_ADJUST_ERANGE1() use for float pow should be replaced, too.) -- ___ Python tracker <ht

[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

[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

[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

[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

[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

[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

[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

[issue45392] docstring of "type" could use an update

2021-10-06 Thread Mark Dickinson
Mark Dickinson added the comment: Larry: the first line was introduced in #20189. Does it still make sense to keep it at this point? -- nosy: +larry ___ Python tracker <https://bugs.python.org/issue45

[issue45392] docstring of "type" could use an update

2021-10-06 Thread Mark Dickinson
New submission from Mark Dickinson : The docstring of the "type" builtin is mildly confusing. Here's what the first few lines of the output for `help(type)` look like for me (on Python 3.10.0rc2): class type(object) | type(object_or_name, bases, dict) | type(object) -> the

[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

[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

[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

[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

[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

[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.

[issue45333] += operator and accessors bug?

2021-09-30 Thread Mark Dickinson
Mark Dickinson added the comment: Did you by any chance get an error message resembling the following? > "Cannot cast ufunc 'add' output from dtype('float64') to dtype('int64') with > casting rule 'same_kind'" (If you can give us a complete piece of code that we c

[issue45332] Decimal test and benchmark are broken

2021-09-30 Thread Mark Dickinson
Change by Mark Dickinson : -- nosy: +mark.dickinson ___ Python tracker <https://bugs.python.org/issue45332> ___ ___ 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: 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

[issue36841] Supporting customization of float encoding in JSON

2021-09-30 Thread Mark Dickinson
Change by Mark Dickinson : -- nosy: +mark.dickinson ___ Python tracker <https://bugs.python.org/issue36841> ___ ___ 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

[issue45318] Python 3.10: cyclomatic complexity of match-case syntax

2021-09-29 Thread Mark Dickinson
Mark Dickinson added the comment: @Boštjan Mejak: I think this question belongs on a discussion forum rather than in the Python bug tracker - as I understand it, there's no bug reported here, and no change to the Python core proposed. I'll close here. You might consider taking

[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:

[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

[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

[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

[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

[issue44019] operator.call/operator.__call__

2021-09-24 Thread Mark Dickinson
Mark Dickinson added the comment: New changeset bfe26bbad787c124f0ce144cff1b513ef9d2dc9c by Terry Jan Reedy in branch 'main': bpo-44019: Add missing comma to operator.call doc (GH-28551) https://github.com/python/cpython/commit/bfe26bbad787c124f0ce144cff1b513ef9d2dc9c

[issue44019] operator.call/operator.__call__

2021-09-24 Thread Mark Dickinson
Mark Dickinson added the comment: Thanks for the contribution! -- stage: patch review -> resolved status: open -> closed type: -> enhancement ___ Python tracker <https://bugs.python.or

[issue44019] operator.call/operator.__call__

2021-09-24 Thread Mark Dickinson
Mark Dickinson added the comment: New changeset 6587fc60d447603fb8c631d81d9bb379f53c39ab by Antony Lee in branch 'main': bpo-44019: Implement operator.call(). (GH-27888) https://github.com/python/cpython/commit/6587fc60d447603fb8c631d81d9bb379f53c39ab

[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

[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

[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

[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

[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

[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

[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
Change by Mark Shannon : -- pull_requests: +26872 pull_request: https://github.com/python/cpython/pull/28474 ___ Python tracker <https://bugs.python.org/issue43

[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

[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

[issue45134] Protocol dealloc not called if Server is closed

2021-09-18 Thread Mark
Change by Mark : -- stage: -> resolved status: open -> closed ___ Python tracker <https://bugs.python.org/issue45134> ___ ___ Python-bugs-list mailing list

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

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

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

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

[issue45219] Expose indexing and other simple operations on dict-keys in internal API

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

[issue45219] Expose indexing and other simple operations on dict-keys in internal API

2021-09-17 Thread Mark Shannon
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/064464fc38269e70f7e3a34cb25fc9085ab85782

[issue45219] Expose indexing and other simple operations on dict-keys in internal API

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

[issue45218] cmath.log has an invalid signature

2021-09-16 Thread Mark Dickinson
Mark Dickinson added the comment: > and `log` base `math.e` is likely to be less accurate than plain natural log Nope, that's nonsense, since the two-argument form simply divides by log(base), and while log(math.e) is mathematically not exactly 1 (its exact value, assuming IEEE 754 binar

[issue45218] cmath.log has an invalid signature

2021-09-16 Thread Mark Dickinson
Mark Dickinson added the comment: See also #36306 and #29299. There may be nothing to be done here, but it would be nice if math.log and cmath.log at least behaved in the same way. A default of `None` doesn't seem like a terrible option. (BTW, just to forestall the suggestion, a default

[issue45218] cmath.log has an invalid signature

2021-09-16 Thread Mark Dickinson
Mark Dickinson added the comment: Issue #43067 is similar. I'm not sure what the best solution is in this case: - un-argument-clinic cmath.log, and document the signature using two lines (similar to range): log(z) log(z, base) - change the behaviour of cmath.log so

[issue45219] Expose indexing and other simple operations on dict-keys in internal API

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

[issue45218] cmath.log has an invalid signature

2021-09-16 Thread Mark Dickinson
Change by Mark Dickinson : -- type: -> behavior ___ Python tracker <https://bugs.python.org/issue45218> ___ ___ Python-bugs-list mailing list Unsubscrib

[issue45218] cmath.log has an invalid signature

2021-09-16 Thread Mark Dickinson
New submission from Mark Dickinson : inspect.signature reports that the cmath.log function has an invalid signature: Python 3.11.0a0 (heads/fix-44954:d0ea569eb5, Aug 19 2021, 14:59:04) [Clang 12.0.0 (clang-1200.0.32.29)] on darwin Type "help", "copyright", "credi

[issue45203] Improve specialization stats for LOAD_METHOD and BINARY_SUBSCR

2021-09-15 Thread Mark Shannon
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/11cdf2a6702639571554cbf3f69f57d688564540

[issue45203] Improve specialization stats for LOAD_METHOD and BINARY_SUBSCR

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

[issue45203] Improve specialization stats for LOAD_METHOD and BINARY_SUBSCR

2021-09-15 Thread Mark Shannon
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: Interpreter Core

[issue45152] Prepare for splitting LOAD_CONST into several opcodes

2021-09-14 Thread Mark Shannon
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/c2f1e953371c25f6c42b599ba3d8797effbb503e

[issue42560] Improve Tkinter Documentation

2021-09-12 Thread Mark Roseman
Mark Roseman added the comment: Would like to throw an idea out for feedback regarding the API reference. I've done some preliminary work auto-generating documentation via widget introspection. It's missing a lot, has many bugs, but is far enough along to give a sense of what this approach

<    1   2   3   4   5   6   7   8   9   10   >