File tree 2 files changed +8
-3
lines changed
2 files changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -84,7 +84,9 @@ struct _ceval_runtime_state {
84
84
85
85
struct _ceval_state {
86
86
/* This single variable consolidates all requests to break out of
87
- the fast path in the eval loop. */
87
+ * the fast path in the eval loop.
88
+ * It is by far the hottest field in this struct and
89
+ * should be placed at the beginning. */
88
90
_Py_atomic_int eval_breaker ;
89
91
/* Request for dropping the GIL */
90
92
_Py_atomic_int gil_drop_request ;
Original file line number Diff line number Diff line change @@ -48,6 +48,11 @@ struct _Py_long_state {
48
48
*/
49
49
struct _is {
50
50
51
+ /* This struct countains the eval_breaker,
52
+ * which is by far the hottest field in this struct
53
+ * and should be placed at the beginning. */
54
+ struct _ceval_state ceval ;
55
+
51
56
PyInterpreterState * next ;
52
57
53
58
int64_t id ;
@@ -109,8 +114,6 @@ struct _is {
109
114
// Dictionary of the builtins module
110
115
PyObject * builtins ;
111
116
112
- struct _ceval_state ceval ;
113
-
114
117
struct _import_state imports ;
115
118
116
119
/* The per-interpreter GIL, which might not be used. */
You can’t perform that action at this time.
0 commit comments