mirror of
https://github.com/python/cpython.git
synced 2025-07-23 03:05:38 +00:00
bpo-46841: Use inline caching for attribute accesses (GH-31640)
This commit is contained in:
parent
65b92ccdec
commit
05a8bc1c94
10 changed files with 292 additions and 270 deletions
4
Include/opcode.h
generated
4
Include/opcode.h
generated
|
@ -183,7 +183,6 @@ extern "C" {
|
|||
#define LOAD_FAST__LOAD_CONST 173
|
||||
#define LOAD_CONST__LOAD_FAST 174
|
||||
#define STORE_FAST__STORE_FAST 175
|
||||
#define LOAD_FAST__LOAD_ATTR_INSTANCE_VALUE 176
|
||||
#define DO_TRACING 255
|
||||
|
||||
extern const uint8_t _PyOpcode_InlineCacheEntries[256];
|
||||
|
@ -213,9 +212,12 @@ static const uint32_t _PyOpcode_Jump[8] = {
|
|||
const uint8_t _PyOpcode_InlineCacheEntries[256] = {
|
||||
[BINARY_SUBSCR] = 4,
|
||||
[UNPACK_SEQUENCE] = 1,
|
||||
[STORE_ATTR] = 4,
|
||||
[LOAD_ATTR] = 4,
|
||||
[COMPARE_OP] = 2,
|
||||
[LOAD_GLOBAL] = 5,
|
||||
[BINARY_OP] = 1,
|
||||
[LOAD_METHOD] = 10,
|
||||
};
|
||||
#endif /* OPCODE_TABLES */
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue