summaryrefslogtreecommitdiff
path: root/Include/internal
diff options
context:
space:
mode:
authorBrandt Bucher <brandtbucher@microsoft.com>2023-03-10 17:01:16 -0800
committerGitHub <noreply@github.com>2023-03-10 17:01:16 -0800
commit08b67fb34f4519be1b0bb4673643a2c761c7ae92 (patch)
treee7ab280d96ddc896b3f44845d1d322d317a7d0a0 /Include/internal
parent767d3a8f6f2f94daa15ad3759d0ecdf4c009b7ab (diff)
downloadcpython-git-08b67fb34f4519be1b0bb4673643a2c761c7ae92.tar.gz
GH-90997: Shrink the LOAD_GLOBAL caches (#102569)
Diffstat (limited to 'Include/internal')
-rw-r--r--Include/internal/pycore_code.h2
-rw-r--r--Include/internal/pycore_opcode.h2
2 files changed, 2 insertions, 2 deletions
diff --git a/Include/internal/pycore_code.h b/Include/internal/pycore_code.h
index 10f1e320a1..6bd212dd42 100644
--- a/Include/internal/pycore_code.h
+++ b/Include/internal/pycore_code.h
@@ -20,7 +20,7 @@ extern "C" {
typedef struct {
uint16_t counter;
uint16_t index;
- uint16_t module_keys_version[2];
+ uint16_t module_keys_version;
uint16_t builtin_keys_version;
} _PyLoadGlobalCache;
diff --git a/Include/internal/pycore_opcode.h b/Include/internal/pycore_opcode.h
index f9ab95ca4b..da94fc81dc 100644
--- a/Include/internal/pycore_opcode.h
+++ b/Include/internal/pycore_opcode.h
@@ -48,7 +48,7 @@ const uint8_t _PyOpcode_Caches[256] = {
[STORE_ATTR] = 4,
[LOAD_ATTR] = 9,
[COMPARE_OP] = 1,
- [LOAD_GLOBAL] = 5,
+ [LOAD_GLOBAL] = 4,
[BINARY_OP] = 1,
[SEND] = 1,
[COMPARE_AND_BRANCH] = 1,