mirror of
https://github.com/python/cpython
synced 2024-10-02 23:49:16 +00:00
gh-119786: move adaptive interpreter doc from Python to InternalsDoc (#120137)
This commit is contained in:
parent
f878d46e56
commit
eeb8f67f83
|
@ -14,3 +14,4 @@ # CPython Internals Documentation
|
||||||
|
|
||||||
[Exception Handling](exception_handling.md)
|
[Exception Handling](exception_handling.md)
|
||||||
|
|
||||||
|
[Adaptive Instruction Families](adaptive.md)
|
||||||
|
|
|
@ -2,8 +2,9 @@ # Adding or extending a family of adaptive instructions.
|
||||||
|
|
||||||
## Families of instructions
|
## Families of instructions
|
||||||
|
|
||||||
The core part of PEP 659 (specializing adaptive interpreter) is the families
|
The core part of [PEP 659](https://peps.python.org/pep-0659/)
|
||||||
of instructions that perform the adaptive specialization.
|
(specializing adaptive interpreter) is the families of
|
||||||
|
instructions that perform the adaptive specialization.
|
||||||
|
|
||||||
A family of instructions has the following fundamental properties:
|
A family of instructions has the following fundamental properties:
|
||||||
|
|
||||||
|
@ -30,8 +31,9 @@ ## Families of instructions
|
||||||
|
|
||||||
## Example family
|
## Example family
|
||||||
|
|
||||||
The `LOAD_GLOBAL` instruction (in Python/bytecodes.c) already has an adaptive
|
The `LOAD_GLOBAL` instruction (in
|
||||||
family that serves as a relatively simple example.
|
[Python/bytecodes.c](https://github.com/python/cpython/blob/main/Python/bytecodes.c))
|
||||||
|
already has an adaptive family that serves as a relatively simple example.
|
||||||
|
|
||||||
The `LOAD_GLOBAL` instruction performs adaptive specialization,
|
The `LOAD_GLOBAL` instruction performs adaptive specialization,
|
||||||
calling `_Py_Specialize_LoadGlobal()` when the counter reaches zero.
|
calling `_Py_Specialize_LoadGlobal()` when the counter reaches zero.
|
Loading…
Reference in a new issue