[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

[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

[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

[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

[issue45725] test_freeze doesn't clean up after itself

2021-11-16 Thread Mark Shannon
Mark Shannon added the comment: test_tools also seems to fail a lot unless `make clean` is run first. Possibly related? -- ___ Python tracker <https://bugs.python.org/issue45

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

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

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

2021-11-16 Thread Mark Shannon
Mark Shannon added the comment: New changeset b9310773756f40f77e075f221a90dd41e6964efc by Mark Shannon in branch 'main': bpo-45753: Make recursion checks more efficient. (GH-29524) https://github.com/python/cpython/commit/b9310773756f40f77e075f221a90dd41e6964efc

[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

[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

[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

[issue45784] spam

2021-11-11 Thread Mark Dickinson
Change by Mark Dickinson : -- title: SAP HANA Training in Chennai -> spam ___ Python tracker <https://bugs.python.org/issue45784> ___ ___ Python-bugs-list mai

[issue45784] SAP HANA Training in Chennai

2021-11-11 Thread Mark Dickinson
Change by Mark Dickinson : -- Removed message: https://bugs.python.org/msg406152 ___ Python tracker <https://bugs.python.org/issue45784> ___ ___ Python-bug

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

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

[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

[issue45776] abc submodule not an attribute of collections on Python 3.10.0 on Windows

2021-11-10 Thread Mark Dickinson
Mark Dickinson added the comment: On Mac, collections.abc is imported at startup time via site.py (which imports rlcompleter, which imports inspect, which imports collections.abc). I'd guess it's the same on Linux. mdickinson@mirzakhani cpython % ./python.exe Python 3.11.0a2+ (heads/main

[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

[issue45689] Add the ability to give custom names to threads created by ThreadPoolExecutor

2021-11-09 Thread Mark Dickinson
Mark Dickinson added the comment: Sorry Rahul: I'm not the right person to help you push this forward. I'm sympathetic to the problem: I've encountered similar issues in "Real Code", where we needed to associate log outputs generated by worker pool threads with the ac

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

2021-11-08 Thread Mark Shannon
New submission from Mark Shannon : There are three things we want to do: 1. Speed up pushing and popping frames. See https://github.com/faster-cpython/ideas/issues/111 for details. 2. Avoid tracing and other admin overhead on entering and leaving. See https://github.com/faster-cpython/ideas

[issue45689] Add the ability to give custom names to threads created by ThreadPoolExecutor

2021-11-08 Thread Mark Dickinson
Mark Dickinson added the comment: > previously one could write .submit(function_name, *args, **kwargs) > but now one should write > .submit(function_name, name_of_thread, *args, **kwargs) > name_of_thread can be None This approach can't work, I'm afraid: it would be a backwards-

[issue45739] The Python implementation of Decimal does not support the "N" format

2021-11-07 Thread Mark Dickinson
Mark Dickinson added the comment: Interesting. I think the behaviour of the Python implementation behaviour is actually more correct here: neither `int` nor `float` supports 'N', and I'm not seeing any indication in tests or documentation that 'N' should be supported. So is this a bug

[issue45708] PEP 515-style formatting with underscores does not seem to work for Decimal

2021-11-07 Thread Mark Dickinson
Mark Dickinson added the comment: Christian Heimes pointed out in the PR discussion that we can't simply modify libmpdec, since some vendors unbundle the mpdecimal library. So some options are: 0. Do nothing. 1. Request that this feature to be added upstream, so that it eventually makes

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

2021-11-06 Thread Mark Dickinson
Change by Mark Dickinson : -- keywords: +patch pull_requests: +27693 stage: -> patch review pull_request: https://github.com/python/cpython/pull/29439 ___ Python tracker <https://bugs.python.org/issu

[issue45708] PEP 515-style formatting with underscores does not seem to work for Decimal

2021-11-06 Thread Mark Dickinson
Mark Dickinson added the comment: > It looks like quite similar changes have already been made: Yes, I think this isn't something that needs to be resolved for this issue, but it is something we need to think about. (Though perhaps the resolution is just "Don't worry about it until

[issue45708] PEP 515-style formatting with underscores does not seem to work for Decimal

2021-11-06 Thread Mark Dickinson
Change by Mark Dickinson : -- keywords: +patch pull_requests: +27692 stage: -> patch review pull_request: https://github.com/python/cpython/pull/29438 ___ Python tracker <https://bugs.python.org/issu

[issue45708] PEP 515-style formatting with underscores does not seem to work for Decimal

2021-11-06 Thread Mark Dickinson
Mark Dickinson added the comment: Serhiy: this is not a duplicate of #43624. That issue is about underscores in the *fractional* part of a (float / complex / Decimal) number, and the changes to the formatting mini-language syntax that would be necessary to support that. This issue is simply

[issue45733] importlib.abc.Traversable.name does not match

2021-11-05 Thread John-Mark Gurney
New submission from John-Mark Gurney : The documentation for Traversable.name says it is a method, not a property: https://docs.python.org/3/library/importlib.html#importlib.abc.Traversable.name The issue is that with Python 3.9.7 (default, Nov 1 2021, 11:26:33), using a standard posix

[issue45725] test_freeze doesn't clean up after itself

2021-11-05 Thread Mark Shannon
New submission from Mark Shannon : test_tools leaves a copy of the source in Tools/freeze/test/outdir/ which messes up grep and other tools used for searching the source. -- components: Tests messages: 405784 nosy: Mark.Shannon, eric.snow priority: normal severity: normal status: open

[issue45708] PEP 515-style formatting with underscores does not seem to work for Decimal

2021-11-05 Thread Mark Dickinson
Change by Mark Dickinson : -- nosy: -mark.dickinson ___ Python tracker <https://bugs.python.org/issue45708> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue45708] PEP 515-style formatting with underscores does not seem to work for Decimal

2021-11-04 Thread Mark Dickinson
Mark Dickinson added the comment: > whether Decimal should extend beyond the specification in this case We already go way beyond the original specification for string formatting. The spec doesn't go further than specifying to-scientific-string and to-engineering-string, neither of wh

[issue45708] PEP 515-style formatting with underscores does not seem to work for Decimal

2021-11-04 Thread Mark Dickinson
Mark Dickinson added the comment: I think the two main reasons that applied to not implementing the parsing part of PEP 515 for the Decimal type (speed, compliance with the IBM specification) don't apply to the formatting side. We do need to think about the implications of making local

[issue45708] PEP 515-style formatting with underscores does not seem to work for Decimal

2021-11-04 Thread Mark Dickinson
Change by Mark Dickinson : -- nosy: +eric.smith, mark.dickinson ___ Python tracker <https://bugs.python.org/issue45708> ___ ___ Python-bugs-list mailin

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

2021-11-04 Thread Mark Shannon
Mark Shannon added the comment: Probably an oversight when converting to zero-overhead exceptions. -- assignee: -> Mark.Shannon type: -> behavior ___ Python tracker <https://bugs.python.org/i

[issue45691] Partial moving of core objects to interpreter state is incorrect at best, unsafe at worse.

2021-11-03 Thread Mark Shannon
Mark Shannon added the comment: New changeset acc89db9233abf4d903af9a7595a2ed7478fe7d3 by Mark Shannon in branch 'main': bpo-45691: Make array of small ints static to fix use-after-free error. (GH-29366) https://github.com/python/cpython/commit/acc89db9233abf4d903af9a7595a2ed7478fe7d3

[issue45702] Python/dtoa.c requires 53 bit hardware rounding unavalable on x64

2021-11-03 Thread Mark Dickinson
Mark Dickinson added the comment: I'm not sure I understand the problem that you're reporting - what issues are you seeing in practice? x64 should be fine here. In normal circumstances, the compiled version of dtoa.c will be using SSE2 instructions and will already be doing floating-point

[issue45691] Partial moving of core objects to interpreter state is incorrect at best, unsafe at worse.

2021-11-02 Thread Mark Shannon
Change by Mark Shannon : -- keywords: +patch pull_requests: +27626 stage: -> patch review pull_request: https://github.com/python/cpython/pull/29366 ___ Python tracker <https://bugs.python.org/issu

[issue45691] Partial moving of core objects to interpreter state is incorrect at best, unsafe at worse.

2021-11-02 Thread Mark Shannon
New submission from Mark Shannon : We currently have an unstable state in the VM where some core objects are static and some are per-interpreter. For example, smalls ints are allocated per-interpreter, but many classes are allocated statically. This means that if any int is reachable from

[issue45522] Allow to build Python without freelists

2021-10-28 Thread Mark Shannon
Mark Shannon added the comment: I think we should revert this. It just makes working with freelists more cumbersome. Having more configure options just makes it more likely that we will fail to test some configuration. If you want to disable freelists in your experiments, feel free to do so

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

2021-10-28 Thread Mark Shannon
Mark Shannon added the comment: New changeset 7f61d9d84843e3445f62eb00c47902f0daa30a72 by Mark Shannon in branch 'main': bpo-45256: Rationalize code around Python-to-Python calls a bit. (GH-29235) https://github.com/python/cpython/commit/7f61d9d84843e3445f62eb00c47902f0daa30a72

[issue44525] Implement CALL_FUNCTION adaptive interpreter optimizations

2021-10-28 Thread Mark Shannon
Mark Shannon added the comment: New changeset 0a1a36b74bdf8da286924a1c9652853b1c46f536 by Ken Jin in branch 'main': bpo-44525: Add recursive checks for `CALL_FUNCTION_BUILTIN_O` (GH-29271) https://github.com/python/cpython/commit/0a1a36b74bdf8da286924a1c9652853b1c46f536

[issue45630] Dump CodeObject API for debugging

2021-10-28 Thread Mark Shannon
Mark Shannon added the comment: What is the motivation for this? I see it could be useful when modifying the compiler, but there is already code for dumping the CFG in the compiler. https://github.com/python/cpython/blob/main/Python/compile.c#L7565 -- nosy: +Mark.Shannon

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

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