Brandt Bucher
276d77724f
GH-98686: Quicken everything (GH-98687)
2022-11-02 10:42:57 -07:00
Mark Shannon
22863df7ca
GH-96793: Change `FOR_ITER` to not pop the iterator on exhaustion. (GH-96801)
...
Change FOR_ITER to have the same stack effect regardless of whether it branches or not.
Performance is unchanged as FOR_ITER (and specialized forms jump over the cleanup code).
2022-10-27 11:55:03 +01:00
adphrost
a41ed975e8
GH-91049: Introduce set vectorcall field API for PyFunctionObject (GH-92257)
...
Co-authored-by: Andrew Frost <adfrost@fb.com>
Co-authored-by: Itamar Ostricher <itamarost@gmail.com>
2022-09-15 16:42:37 +01:00
Brandt Bucher
b4954b1a9e
GH-90230: Fix warnings and failures with --enable-pystats (GH-96622)
2022-09-09 14:42:29 -07:00
Brandt Bucher
cd0ff9bd14
GH-93911: Fix `LOAD_ATTR_PROPERTY` caches (GH-96519)
2022-09-06 12:11:38 +01:00
Irit Katriel
4c72517cad
gh-93554: Conditional jump opcodes only jump forward (GH-96318)
2022-09-01 21:36:47 +01:00
Matthias Görgens
4a6fa89465
Remove dead code in _PyDict_GetItemHint and rename to _PyDict_LookupIndex (GH-95948)
2022-08-18 10:19:21 +01:00
Ken Jin
7276ca25f5
GH-93911: Specialize `LOAD_ATTR` for custom `__getattribute__` (GH-93988)
2022-08-17 12:37:07 +01:00
Mark Shannon
de388c0a7b
GH-95245: Store object values and dict pointers in single tagged pointer. (GH-95278)
2022-08-01 14:34:54 +01:00
Brandt Bucher
e402b26b7f
GH-95113: Don't use EXTENDED_ARG_QUICK in unquickened code (GH-95121)
2022-07-22 11:04:20 -07:00
Brandt Bucher
daf68ba92f
GH-94822: Don't specialize when metaclasses are involved (GH-94892)
2022-07-18 10:10:22 -07:00
Mark Shannon
c0453a40fa
GH-94163: Add BINARY_SLICE and STORE_SLICE instructions. (GH-94168)
2022-06-27 12:24:23 +01:00
Mark Shannon
6f8875eba3
GH-93841: Allow stats to be turned on and off, cleared and dumped at runtime. (GH-93843)
2022-06-21 15:40:54 +01:00
Dennis Sweeney
5fcfdd87c9
GH-91432: Specialize FOR_ITER (GH-91713)
...
* Adds FOR_ITER_LIST and FOR_ITER_RANGE specializations.
* Adds _PyLong_AssignValue() internal function to avoid temporary boxing of ints.
2022-06-21 11:19:26 +01:00
Christian Heimes
77c839c98f
gh-94021: Address unreachable code warning in specialize code (GH-94022)
2022-06-20 23:34:11 -07:00
Ken Jin
a51742ab82
gh-93911: Specialize `LOAD_ATTR_PROPERTY` (GH-93912)
2022-06-17 23:13:17 +08:00
Ken Jin
ab45c1dde0
Fix BINARY_SUBSCR_GETITEM stats (GH-93903)
2022-06-16 15:02:07 +01:00
Mark Shannon
6b330002b1
Rename 'LOAD_METHOD' specialization stat consts to 'ATTR'. (GH-93812)
2022-06-14 16:44:01 +01:00
Mark Shannon
ef6e44d392
Remove LOAD_METHOD stats. (GH-93807)
2022-06-14 15:03:15 +01:00
Ken Jin
b083450f88
GH-93429: Merge `LOAD_METHOD` back into `LOAD_ATTR` (GH-93430)
2022-06-14 11:36:22 +01:00
Dennis Sweeney
c5d0517ea4
Add more FOR_ITER specialization stats (GH-32151)
2022-06-13 01:40:54 -04:00
Mark Shannon
f012df706c
Shrink the LOAD_METHOD cache by one codeunit. ( #93537 )
2022-06-07 10:28:53 +01:00
Mark Shannon
eb618d5ff0
GH-93354: Use exponential backoff to avoid excessive specialization attempts. (GH-93355)
2022-05-31 11:58:26 +01:00
Mark Shannon
bbcf42449e
GH-90230: Add stats to breakdown the origin of calls to `PyEval_EvalFrame` (GH-93284)
2022-05-27 16:31:41 +01:00
Ken Jin
5e6e5b98a8
gh-92777: Add LOAD_METHOD_LAZY_DICT (GH-92778)
2022-05-25 14:06:15 +01:00
Mark Shannon
e48ac9c100
GH-90690: Remove `PRECALL` instruction (GH-92925)
2022-05-19 11:05:26 +01:00
Mark Shannon
a4460f2eb8
Split refcount stats into 'interpreter' and 'non-interpreter' (GH-92919)
2022-05-18 14:38:43 +01:00
Mark Shannon
fa2b8b75eb
Improve object stats ( #92845 )
...
* Add incref/decref stats
* Show ratios for allocation in summary
2022-05-16 14:35:11 +01:00
Mark Shannon
f8a2fab212
GH-92239: Make sure that PEP 523 is supported, even when specializing first. (GH-92245)
2022-05-04 09:31:21 -06:00
Mark Shannon
836b17c9c3
Add more stats for freelist use and allocations. (GH-92211)
2022-05-03 16:40:24 -06:00
Victor Stinner
64a54e511d
gh-91719: Add pycore_opcode.h internal header file ( #91906 )
...
Move the following API from Include/opcode.h (public C API) to a new
Include/internal/pycore_opcode.h header file (internal C API):
* EXTRA_CASES
* _PyOpcode_Caches
* _PyOpcode_Deopt
* _PyOpcode_Jump
* _PyOpcode_OpName
* _PyOpcode_RelativeJump
2022-04-26 00:14:30 +02:00
Irit Katriel
dd207a6ac5
bpo-47120: make POP_JUMP_IF_TRUE/FALSE/NONE/NOT_NONE relative (GH-32400)
2022-04-11 10:40:24 +01:00
Dennis Sweeney
6c6e0408a6
bpo-47009: Let PRECALL_NO_KW_LIST_APPEND do its own POP_TOP (GH-32239)
2022-04-05 11:18:30 +01:00
Irit Katriel
a00518d9ad
bpo-47120: Replace the JUMP_ABSOLUTE opcode by the relative JUMP_BACKWARD (GH-32115)
2022-03-31 14:14:15 +01:00
Mark Shannon
04acfa94bb
Merge deoptimization blocks in interpreter (GH-32155)
2022-03-30 13:11:33 +01:00
Kumar Aditya
58448cbd96
bpo-47127: Specialize calls for fastcall c methods with keywords (GH-32125)
...
* add PRECALL_METHOD_DESCRIPTOR_FAST_WITH_KEYWORDS
2022-03-28 03:53:25 +08:00
Dennis Sweeney
cca43b7d64
bpo-47053: Reduce deoptimization in BINARY_OP_INPLACE_ADD_UNICODE (GH-31318)
...
* Don't deopt if refcounts are too big
* Detect more at specialization time
2022-03-25 16:13:19 +00:00
Brandt Bucher
2bde6827ea
bpo-46841: Quicken code in-place (GH-31888)
...
* Moves the bytecode to the end of the corresponding PyCodeObject, and quickens it in-place.
* Removes the almost-always-unused co_varnames, co_freevars, and co_cellvars member caches
* _PyOpcode_Deopt is a new mapping from all opcodes to their un-quickened forms.
* _PyOpcode_InlineCacheEntries is renamed to _PyOpcode_Caches
* _Py_IncrementCountAndMaybeQuicken is renamed to _PyCode_Warmup
* _Py_Quicken is renamed to _PyCode_Quicken
* _co_quickened is renamed to _co_code_adaptive (and is now a read-only memoryview).
* Do not emit unused nonzero opargs anymore in the compiler.
2022-03-21 11:11:17 +00:00
Brandt Bucher
a89c29fbcc
bpo-46841: Add a _Py_SET_OPCODE macro (GH-31780)
2022-03-11 16:31:50 -08:00
Brandt Bucher
5498a61c7c
bpo-46841: Don't use an oparg counter for `STORE_SUBSCR` (GH-31742)
2022-03-08 15:53:22 +00:00
Brandt Bucher
f193631387
bpo-46841: Use inline caching for calls (GH-31709)
2022-03-07 11:45:00 -08:00
Serhiy Storchaka
6927632492
Remove trailing spaces (GH-31695)
2022-03-05 17:47:00 +02:00
Brandt Bucher
c4d2d57eef
bpo-46841: Fix BINARY_OP's handling of inline caches (GH-31671)
2022-03-04 10:51:27 -08:00
Mark Shannon
03c2a36b2b
bpo-46903: Handle str-subclasses in virtual instance dictionaries. (GH-31658)
2022-03-04 11:31:29 +00:00
Brandt Bucher
05a8bc1c94
bpo-46841: Use inline caching for attribute accesses (GH-31640)
2022-03-03 15:31:00 -08:00
Brandt Bucher
127797f572
bpo-46841: Improve the failure stats for COMPARE_OP (GH-31663)
2022-03-03 11:28:47 -08:00
Mark Shannon
b35603532b
Move check for str-only keys in LOAD_GLOBAL specializations to specialization time. (GH-31659)
2022-03-03 15:17:18 +00:00
Mark Shannon
3b0f1c5a71
bpo-46841: Use inline cache for `BINARY_SUBSCR`. (GH-31618)
2022-03-01 16:00:34 +00:00
Brandt Bucher
7820a5897e
bpo-46841: Use inline caching for `COMPARE_OP` (GH-31622)
2022-03-01 13:53:13 +00:00
Mark Shannon
4558af5a8f
bpo-46841: Move the cache for `LOAD_GLOBAL` inline. (GH-31575)
2022-02-28 12:56:29 +00:00