mirror of
https://github.com/python/cpython.git
synced 2025-08-24 18:55:00 +00:00
bpo-46841: Use inline caching for calls (GH-31709)
This commit is contained in:
parent
105b9ac001
commit
f193631387
16 changed files with 494 additions and 735 deletions
|
@ -1571,10 +1571,7 @@ code_sizeof(PyCodeObject *co, PyObject *Py_UNUSED(args))
|
|||
}
|
||||
|
||||
if (co->co_quickened != NULL) {
|
||||
Py_ssize_t count = co->co_quickened[0].entry.zero.cache_count;
|
||||
count += (PyBytes_GET_SIZE(co->co_code)+sizeof(SpecializedCacheEntry)-1)/
|
||||
sizeof(SpecializedCacheEntry);
|
||||
res += count * sizeof(SpecializedCacheEntry);
|
||||
res += PyBytes_GET_SIZE(co->co_code);
|
||||
}
|
||||
|
||||
return PyLong_FromSsize_t(res);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue