Pieter Eendebak
95cbd4a232
gh-146393: Optimize float division operations by mutating uniquely-referenced operands in place (JIT only) (GH-146397)
...
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-15 02:08:04 +08:00
Kumar Aditya
1aa7e7ee6d
gh-gh-131798: optimize LOAD_ATTR_GETATTRIBUTE_OVERRIDDEN in the JIT ( #148555 )
2026-04-14 21:00:32 +05:30
Neko Asakura
52a7f1b7f8
gh-148510: restore func_version check in _LOAD_ATTR_PROPERTY_FRAME (GH-148528)
2026-04-14 22:44:39 +08:00
Hai Zhu
5ce0fe8b6c
gh-148378: Allow multiple consecutive recording ops per macro op (GH-148496)
2026-04-14 19:26:53 +08:00
Charlie Lin
10d275fdf8
gh-148483: Use Py_GCC_ATTRIBUTE(unused) for stop_tracing label (GH-148481)
2026-04-13 21:05:34 +08:00
Sacul
18d7d90ef9
gh-131798: Split _CHECK_AND_ALLOCATE_OBJECT into smaller uops (GH-148433)
...
Co-authored-by: Hai Zhu <haiizhu@outlook.com>
Co-authored-by: Ken Jin <kenjin4096@gmail.com>
2026-04-13 02:31:24 +08:00
Donghee Na
a71b043356
gh-148171: Convert CALL_BUILTIN_CLASS to leave arguments on the stack (gh-148381)
2026-04-11 23:01:25 +09:00
Sacul
e872c19922
gh-148171: Convert variadic argument opcodes to leave their arguments on the stack (CALL_BUILTIN_FAST_WITH_KEYWORDS) ( #148366 )
2026-04-11 13:27:24 +08:00
Kumar Aditya
2b439da972
gh-148171: convert more variadic uops to leave input on stack in JIT ( #148361 )
2026-04-11 10:29:38 +05:30
Kumar Aditya
8f17140fc1
gh-131798: split _CALL_BUILTIN_CLASS to smaller uops ( #148094 )
2026-04-10 17:28:20 +00:00
Ken Jin
266247c9a6
gh-148171: Convert CALL_BUILTIN_FAST to leave inputs on the stack for refcount elimination in JIT (GH-148172)
2026-04-10 23:11:18 +08:00
Sacul
38d3aef375
gh-134584 : Optimize and eliminate redundant ref-counting for MAKE_FUNCTION in the JIT (GH-144963)
2026-04-09 22:22:53 +08:00
Kumar Aditya
458aca9237
gh-131798: fold super method lookups in JIT ( #148231 )
2026-04-09 13:25:01 +05:30
Sacul
bb03c8bd02
gh-145866: Convert _CALL_METHOD_DESCRIPTOR_NOARGS to leave its inputs on the stack to be cleaned up by _POP_TOP (GH-148227)
2026-04-08 23:21:37 +08:00
Kumar Aditya
e7bf8eac0f
gh-131798: split recursion check to _CHECK_RECURSION_LIMIT and combine checks (GH-148070)
2026-04-04 17:23:03 +08:00
Kumar Aditya
7e275d4965
gh-131798: JIT inline function addresses of builtin methods ( #146906 )
2026-04-04 09:12:13 +05:30
Serhiy Storchaka
6932c3ee6a
gh-145876: Do not mask KeyErrors raised during dictionary unpacking in call (GH-146472)
...
KeyErrors raised in keys() or __getitem__() during dictionary unpacking
in call (func(**mymapping)) are no longer masked by TypeError.
2026-03-29 11:58:52 +03:00
Neko Asakura
a492d9ff74
gh-145866: Convert LIST_EXTEND to leave its inputs on the stack to be cleaned up by _POP_TOP be cleaned up by _POP_TOP (GH-146383)
2026-03-28 01:04:17 +08:00
Kumar Aditya
bfdaa3c565
gh-131798: JIT: split call method and call builtin opcodes into smaller uops ( #146463 )
2026-03-26 14:20:57 +00:00
Serhiy Storchaka
0e543055b0
gh-145876: Do not mask AttributeErrors raised during dictionary unpacking (GH-145906)
...
AttributeErrors raised in keys() or __getitem__() during
dictionary unpacking ({**mymapping} or func(**mymapping)) are
no longer masked by TypeError.
2026-03-26 13:48:57 +00:00
Sacul
1516c26399
gh-145866: Convert DICT_UPDATE to leave its inputs on the stack to be cleaned up by _POP_TOP (GH-146190)
2026-03-26 19:38:44 +08:00
Kevin Huai
f5364ae750
gh-145866: Convert _CALL_INTRINSIC_2 to leave its inputs on the stack to be cleaned up by _POP_TOP (GH-146262)
2026-03-26 17:41:07 +08:00
Neko Asakura
6d73bc2267
gh-145866: Convert DICT_MERGE to leave its inputs on the stack to be cleaned up by _POP_TOP (GH-146329)
2026-03-24 18:31:41 +08:00
Mark Shannon
879c85f6e4
GH-145667: Merge GET_ITER and GET_YIELD_FROM_ITER (GH-146120)
...
* Merge GET_ITER and GET_YIELD_FROM_ITER. Modify SEND to make it a bit more like FOR_ITER
2026-03-21 10:48:13 +00:00
Sacul
0d37e423d5
gh-145866: Convert SET_UPDATE to leave its inputs on the stack to be cleaned up by _POP_TOP (GH-145979)
2026-03-19 19:17:58 +08:00
Victor Stinner
1e4ed93210
gh-146092: Fix error handling in _BINARY_OP_ADD_UNICODE opcode ( #146117 )
...
Fix also error handling in _BINARY_OP_ADD_FLOAT,
_BINARY_OP_SUBTRACT_FLOAT and _BINARY_OP_MULTIPLY_FLOAT opcodes.
PyStackRef_FromPyObjectSteal() must not be called with a NULL
pointer.
2026-03-18 17:23:05 +01:00
Ken Jin
3d0824aef2
gh-127958: Trace from RESUME in the JIT (GH-145905)
2026-03-17 00:18:59 +08:00
Sacul
37121ef77e
gh-145866: Convert CALL_INTRINSIC_1 to leave its inputs on the stack to be cleaned up by _POP_TOP. (GH-145964)
2026-03-16 11:58:12 +00:00
Sacul
798070d8ca
gh-134584: Eliminate redundant refcounting in JIT for MATCH_CLASS (GH-144821)
2026-03-14 12:00:18 +00:00
Mark Shannon
453562a467
GH-145692: Convert DEOPT_IFs to EXIT_IFs (GH-145751)
...
* Convert DEOPT_IFs to EXIT_IFs for guards. Keep DEOPT_IF for intentional drops to the interpreter.
* Modify BINARY_OP_SUBSCR_LIST_INT and STORE_SUBSCR_LIST_INT to handle negative indices, to keep EXIT_IFs and DEOPT_IFs in different uops
2026-03-12 10:57:59 +00:00
Hai Zhu
f062014d38
gh-144540: Add _MAKE_HEAP_SAFE uop to eliminate unnecessary refcount operations in RETURN_VALUE and YIELD_VALUE (GH-144414)
2026-03-11 20:24:19 +00:00
Sergey Miryanov
478a315b7a
GH-145247: Implement _PyTuple_FromPair() ( #145325 )
...
Implement _PyTuple_FromPair() and _PyTuple_FromPairSteal().
Co-authored-by: Pieter Eendebak <pieter.eendebak@gmail.com>
Co-authored-by: Victor Stinner <vstinner@python.org>
Co-authored-by: Bartosz Sławecki <bartosz@ilikepython.com>
Co-authored-by: Kumar Aditya <kumaraditya@python.org>
2026-03-10 11:44:20 +01:00
Hai Zhu
107863ee17
gh-144569: Avoid creating temporary objects in BINARY_SLICE for list, tuple, and unicode (GH-144590)
...
* Scalar replacement of BINARY_SLICE for list, tuple, and unicode
2026-03-02 17:02:38 +00:00
Sam Gross
72eca2af59
gh-145230: Update lockbench (gh-145231)
...
Remove PyThread_type_lock (now uses PyMutex internally).
Add new benchmark options:
- work_inside/work_outside: control work inside and outside the critical section to vary contention levels
- num_locks: use multiple independent locks with threads assigned round-robin
- total_iters: fixed iteration count per thread instead of time-based, useful for measuring fairness
- num_acquisitions: lock acquisitions per loop iteration
- random_locks: acquire random lock each iteration
Also return elapsed time from benchmark_locks() and switch lockbench.py to use argparse.
2026-02-27 14:09:05 -05:00
Donghee Na
0f759f1171
gh-145122: Add _GUARD_NOS_ANY_DICT to prevent STORE_SUBSCR_DICT on frozendict (gh-145039)
2026-02-25 00:48:45 +09:00
Mark Shannon
3f37b94c73
GH-144651: Optimize the new uops added when recording values during tracing. (GH-144948)
...
* Handle dependencies in the optimizer, not the tracer
* Strengthen some checks to avoid relying on optimizer for correctness
2026-02-19 11:52:57 +00:00
Donghee Na
3e2f5c133f
gh-141510: Update specializer to support frozendict (gh-144949)
2026-02-19 01:10:53 +09:00
Pablo Galindo Salgado
46d5106cfa
gh-142349: Implement PEP 810 - Explicit lazy imports ( #142351 )
...
Co-authored-by: T. Wouters <twouters@meta.com >
Co-authored-by: Brittany Reynoso <breynoso@meta.com>
Co-authored-by: Dino Viehland <dinoviehland@meta.com>
2026-02-12 00:15:33 +00:00
Sacul
6c8ca1c378
gh-134584: Optimize _BINARY_OP_SUBSCR_LIST_SLICE (GH-144659)
2026-02-10 22:33:32 +08:00
Ken Jin
895e83727d
gh-144549: Fix tail calling interpreter on Windows for FT (GH-144550)
2026-02-06 19:20:28 +00:00
Sam Gross
0fdf6a9a71
gh-144513: Skip critical section locking during stop-the-world (gh-144524)
...
When the interpreter is in a stop-the-world pause, critical sections
don't need to acquire locks since no other threads can be running.
This avoids a potential deadlock where lock fairness hands off ownership
to a thread that has already suspended for stop-the-world.
2026-02-06 15:14:08 +00:00
Sam Gross
d891b2bbd1
gh-139103: Improve namedtuple scaling in free-threaded build (gh-144332)
...
Add `_Py_type_getattro_stackref`, a variant of type attribute lookup
that returns `_PyStackRef` instead of `PyObject*`. This allows returning
deferred references in the free-threaded build, reducing reference count
contention when accessing type attributes.
This significantly improves scaling of namedtuple instantiation across
multiple threads.
* Add blurb
* Rename PyObject_GetAttrStackRef to _PyObject_GetAttrStackRef
* Apply suggestion from @vstinner
Co-authored-by: Victor Stinner <vstinner@python.org>
* Apply suggestion from @vstinner
Co-authored-by: Victor Stinner <vstinner@python.org>
* format
* Update Include/internal/pycore_function.h
Co-authored-by: Victor Stinner <vstinner@python.org>
---------
Co-authored-by: Victor Stinner <vstinner@python.org>
2026-02-06 09:43:05 -05:00
Mark Shannon
b53fc7caa6
GH-144179: Use recorded values to make optimizer more robust (GH-144437)
...
* Add three new symbol kinds
* Do not smuggle code object in _PUSH_FRAME operand
* Fix small bug in predicate analysis
2026-02-05 08:58:41 +00:00
Mark Shannon
141fd8b894
GH-144179: Add value recording to JIT tracing front-end (GH-144303)
2026-02-02 16:57:04 +00:00
Sam Gross
6ea3f8cd7f
gh-144289: Remove ENABLE_SPECIALIZATION_FT (gh-144290)
...
Now that the specializing interpreter works with free threading,
replace ENABLE_SPECIALIZATION_FT with ENABLE_SPECIALIZATION and
replace requires_specialization_ft with requires_specialization.
Also limit the uniquely referenced check to FOR_ITER_RANGE. It's not
necessary for FOR_ITER_GEN and would cause test_for_iter_gen to fail.
2026-01-27 17:52:50 -05:00
AN Long
6e55337f8a
gh-143995: Eliminate redundant refcounting in the JIT from LOAD_ATTR_MODULE (GH-143996)
2026-01-25 18:24:44 +00:00
AN Long
4e10fa993a
gh-144007: Eliminate redundant refcounting in the JIT for BINARY_OP (GH-144011)
2026-01-24 09:35:32 +00:00
AN Long
2f42f83344
gh-144005: Eliminate redundant refcounting in the JIT for BINARY_OP_EXTEND ( #144006 )
2026-01-23 17:19:01 +00:00
AN Long
54bedcf714
gh-144012: Check null binary op extend ( #144014 )
2026-01-19 02:38:37 +08:00
Ken Jin
949b5ec8e6
gh-142913: Remove JIT interpreter for interpreter generator tests (GH-143944)
2026-01-17 00:34:39 +00:00