summaryrefslogtreecommitdiffstats
path: root/Python/specialize.c
Commit message (Collapse)AuthorAgeFilesLines
...
* bpo-46417: Use _PyType_CAST() in Python directory (GH-30769)Victor Stinner2022-01-211-2/+1
|
* bpo-46409: Make generators in bytecode (GH-30633)Mark Shannon2022-01-201-4/+0
| | | | | | | | | | | | * Add RETURN_GENERATOR and JUMP_NO_INTERRUPT opcodes. * Trim frame and generator by word each. * Minor refactor of frame.c * Update test.test_sys to account for smaller frames. * Treat generator functions as normal functions when evaluating and specializing.
* bpo-46405: fix msvc compiler warnings (GH-30627)Kumar Aditya2022-01-171-1/+1
|
* bpo-45609: More specialization stats for STORE_SUBSCR (GH-30193)Dennis Sweeney2022-01-041-3/+68
|
* bpo-46072: Add top level stats struct (GH-30169)Mark Shannon2021-12-171-47/+51
|
* Better randomization of stats filenames. (GH-30145)Mark Shannon2021-12-161-2/+14
|
* bpo-45829: Check `__getitem__`'s version for overflow before specializing ↵Brandt Bucher2021-12-161-1/+1
| | | | | | | (GH-30129) * Check __getitem__'s version for overflow. * Use SPEC_FAIL_OUT_OF_VERSIONS instead
* bpo-46072: Add --with-pystats configure option to simplify gathering of VM ↵Mark Shannon2021-12-151-25/+22
| | | | | | | | | stats (GH-30116) * Simplify specialization stats collection macros. * Add --enable-pystats option to configure. * Update specialization summary script to handle larger number of kinds
* bpo-44525: Specialize for calls to type and other builtin classes with 1 ↵Mark Shannon2021-12-151-2/+25
| | | | argument. (GH-29942)
* bpo-44525: Split calls into PRECALL and CALL (GH-30011)Mark Shannon2021-12-141-20/+79
| | | | | | | | | | * Add 3 new opcodes for calls: PRECALL_METHOD, CALL_NO_KW, CALL_KW. * Update specialization to handle new CALL opcodes. * Specialize call to method descriptors. * Remove old CALL opcodes: CALL_FUNCTION, CALL_METHOD, CALL_METHOD_KW, CALL_FUNCTION_KW.
* bpo-45510: Check both types when specializing subtraction (GH-29995)Brandt Bucher2021-12-091-0/+4
|
* bpo-45947: Place dict and values pointer at fixed (negative) offset just ↵Mark Shannon2021-12-071-62/+34
| | | | | | | | | | | | | | | | | | | before GC header. (GH-29879) * Place __dict__ immediately before GC header for plain Python objects. * Fix up lazy dict creation logic to use managed dict pointers. * Manage values pointer, placing them directly before managed dict pointers. * Convert hint-based load/store attr specialization target managed dict classes. * Specialize LOAD_METHOD for managed dict objects. * Remove unsafe _PyObject_GC_Calloc function. * Remove unsafe _PyObject_GC_Malloc() function. * Add comment explaning use of Py_TPFLAGS_MANAGED_DICT.
* bpo-45885: Specialize COMPARE_OP (GH-29734)Dennis Sweeney2021-12-031-0/+79
| | | | | | | * Add COMPARE_OP_ADAPTIVE adaptive instruction. * Add COMPARE_OP_FLOAT_JUMP, COMPARE_OP_INT_JUMP and COMPARE_OP_STR_JUMP specialized instructions. * Introduce and use _PyUnicode_Equal
* bpo-44525: Copy free variables in bytecode to allow calls to inner functions ↵Mark Shannon2021-11-231-4/+1
| | | | | | | | | | | to be specialized (GH-29595) * Make internal APIs that take PyFrameConstructor take a PyFunctionObject instead. * Add reference to function to frame, borrow references to builtins and globals. * Add COPY_FREE_VARS instruction to allow specialization of calls to inner functions.
* bpo-45609: Specialize STORE_SUBSCR (GH-29242)Dennis Sweeney2021-11-191-0/+51
| | | | | * Specialize STORE_SUBSCR for list[int], and dict[object] * Adds _PyDict_SetItem_Take2 which consumes references to the key and values.
* bpo-45829: Specialize BINARY_SUBSCR for __getitem__ implemented in Python. ↵Mark Shannon2021-11-181-25/+61
| | | | (GH-29592)
* bpo-45510: Specialize BINARY_SUBTRACT (GH-29523)Dong-hee Na2021-11-181-0/+13
|
* bpo-45636: Remove the old %-formatting fast-path (GH-29532)Brandt Bucher2021-11-151-4/+8
|
* bpo-45636: Merge all numeric operators (GH-29482)Brandt Bucher2021-11-111-78/+65
|
* bpo-45527: Don't count cache hits, just misses. (GH-29092)Mark Shannon2021-10-201-14/+26
|
* bpo-44525: Specialize simple Python calls. (GH-29033)Mark Shannon2021-10-201-20/+87
|
* bpo-44525: Specialize ``CALL_FUNCTION`` for C function calls (GH-26934)Ken Jin2021-10-191-0/+147
|
* bpo-45434: Include stdlib.h for specialize stat (GH-29015)Dong-hee Na2021-10-181-1/+2
|
* bpo-45367: Specialize BINARY_MULTIPLY (GH-28727)Dennis Sweeney2021-10-141-0/+33
|
* bpo-45340: Don't create object dictionaries unless actually needed (GH-28802)Mark Shannon2021-10-131-74/+67
| | | | | | | | | | | | | | * Never change types' cached keys. It could invalidate inline attribute objects. * Lazily create object dictionaries. * Update specialization of LOAD/STORE_ATTR. * Don't update shared keys version for deletion of value. * Update gdb support to handle instance values. * Rename SPLIT_KEYS opcodes to INSTANCE_VALUE.
* Fix typos in the Python directory (GH-28767)Christian Clauss2021-10-061-1/+1
|
* bpo-45219: Factor dictkey indexing (GH-28389)Mark Shannon2021-09-171-20/+19
|
* bpo-45107: Make LOAD_METHOD_CLASS safer and faster, clean up comments (GH-28177)Ken Jin2021-09-171-8/+7
| | | | | * Improve comments * Check cls is a type, remove dict calculation
* bpo-45203: fix compiler warnings (GH-28357)Ken Jin2021-09-171-0/+1
| | | Co-authored-by: Mark Shannon <mark@hotpy.org>
* bpo-45203: Cleanup stats gathering code for LOAD_METHOD (GH-28352)Mark Shannon2021-09-151-41/+39
|
* Refine specialization stats (GH-27992)Mark Shannon2021-08-271-17/+89
|
* bpo-44945: Specialize BINARY_ADD (GH-27967)Mark Shannon2021-08-271-6/+56
|
* bpo-44889: Specialize LOAD_METHOD with PEP 659 adaptive interpreter (GH-27722)Ken Jin2021-08-171-10/+180
| | | | | | | | Adds four new instructions: * LOAD_METHOD_ADAPTIVE * LOAD_METHOD_CACHED * LOAD_METHOD_MODULE * LOAD_METHOD_CLASS
* bpo-44900: Add five superinstructions. (GH-27741)Mark Shannon2021-08-161-5/+24
| | | | | | | | * LOAD_FAST LOAD_FAST * STORE_FAST LOAD_FAST * LOAD_FAST LOAD_CONST * LOAD_CONST LOAD_FAST * STORE_FAST STORE_FAST
* bpo-44890: collect specialization stats if Py_DEBUG (GH-27731)Irit Katriel2021-08-121-6/+6
|
* Update test__opcode and _Py_GetSpecializationStats with recent ↵Irit Katriel2021-08-111-0/+1
| | | | specialization stat changes (GH-27728)
* Classify specialization failures. Provides more useful stats, with lower ↵Mark Shannon2021-08-101-96/+83
| | | | overhead. (GH-27701)
* bpo-44826: Specialize STORE_ATTR (GH-27590)Mark Shannon2021-08-091-70/+186
| | | | | | | * Generalize cache names for LOAD_ATTR to allow store and delete specializations. * Factor out specialization of attribute dictionary access. * Specialize STORE_ATTR.
* Add option to write specialization stats to files and script to summarize. ↵Mark Shannon2021-08-041-12/+31
| | | | | | | (GH-27575) * Add option to write stats to random file in a directory. * Add script to summarize stats.
* Minor fixes to specialization stats. (GH-27457)Mark Shannon2021-07-291-5/+8
| | | | | * Use class, not value for fail stats for BINARY_SUBSCR. * Fix counts for unquickened instructions.
* bpo-44725 : expose specialization stats in python (GH-27192)Irit Katriel2021-07-291-0/+78
|
* bpo-26280: Port BINARY_SUBSCR to PEP 659 adaptive interpreter (GH-27043)Irit Katriel2021-07-151-1/+47
|
* Add file describing how to add or modify specialized families of ↵Mark Shannon2021-07-011-0/+4
| | | | instructions. (GH-26954)
* bpo-44337: Improve LOAD_ATTR specialization (GH-26759)Mark Shannon2021-06-211-72/+176
| | | | | | | | * Specialize obj.__class__ with LOAD_ATTR_SLOT * Specialize instance attribute lookup with attribute on class, provided attribute on class is not an overriding descriptor. * Add stat for how many times the unquickened instruction has executed.
* Add extra stats for attribute misses (GH-26732)Mark Shannon2021-06-151-2/+85
|
* bpo-44338: Port LOAD_GLOBAL to PEP 659 adaptive interpreter (GH-26638)Mark Shannon2021-06-141-11/+89
| | | | | | | | | | * Add specializations of LOAD_GLOBAL. * Add more stats. * Remove old opcache; it is no longer used. * Add NEWS
* Add more const modifiers. (GH-26691)Serhiy Storchaka2021-06-121-1/+1
|
* bpo-44337: Port LOAD_ATTR to PEP 659 adaptive interpreter (GH-26595)Mark Shannon2021-06-101-2/+175
| | | | | | | | | | | | | | * Specialize LOAD_ATTR with LOAD_ATTR_SLOT and LOAD_ATTR_SPLIT_KEYS * Move dict-common.h to internal/pycore_dict.h * Add LOAD_ATTR_WITH_HINT specialized opcode. * Quicken in function if loopy * Specialize LOAD_ATTR for module attributes. * Add specialization stats
* bpo-44187: Quickening infrastructure (GH-26264)Mark Shannon2021-06-071-0/+197
* Add co_firstinstr field to code object. * Implement barebones quickening. * Use non-quickened bytecode when tracing. * Add NEWS item * Add new file to Windows build. * Don't specialize instructions with EXTENDED_ARG.