mirror of
https://github.com/python/cpython.git
synced 2025-11-25 21:11:09 +00:00
bpo-26280: Port BINARY_SUBSCR to PEP 659 adaptive interpreter (GH-27043)
This commit is contained in:
parent
a0551059ba
commit
641345d636
7 changed files with 203 additions and 23 deletions
|
|
@ -310,17 +310,18 @@ too_many_cache_misses(_PyAdaptiveEntry *entry) {
|
|||
return entry->counter == saturating_zero();
|
||||
}
|
||||
|
||||
#define BACKOFF 64
|
||||
#define ADAPTIVE_CACHE_BACKOFF 64
|
||||
|
||||
static inline void
|
||||
cache_backoff(_PyAdaptiveEntry *entry) {
|
||||
entry->counter = BACKOFF;
|
||||
entry->counter = ADAPTIVE_CACHE_BACKOFF;
|
||||
}
|
||||
|
||||
/* Specialization functions */
|
||||
|
||||
int _Py_Specialize_LoadAttr(PyObject *owner, _Py_CODEUNIT *instr, PyObject *name, SpecializedCacheEntry *cache);
|
||||
int _Py_Specialize_LoadGlobal(PyObject *globals, PyObject *builtins, _Py_CODEUNIT *instr, PyObject *name, SpecializedCacheEntry *cache);
|
||||
int _Py_Specialize_BinarySubscr(PyObject *sub, PyObject *container, _Py_CODEUNIT *instr);
|
||||
|
||||
#define SPECIALIZATION_STATS 0
|
||||
#define SPECIALIZATION_STATS_DETAILED 0
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue