Skip to content

Commit 9f28e87

Browse files
Up the resume value to 7918
1 parent 159601c commit 9f28e87

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

Include/internal/pycore_backoff.h

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -133,8 +133,11 @@ initial_jump_backoff_counter(void)
133133
JUMP_BACKWARD_INITIAL_BACKOFF);
134134
}
135135

136-
// Set this to slightly (~25%) higher than JUMP_BACKWARD_INITIAL_VALUE
137-
#define RESUME_INITIAL_VALUE 5002
136+
// This needs to be around 2-4x of JUMP_BACKWARD_INITIAL_VALUE
137+
// The reasoning is that we always want loop traces to form and inline
138+
// functions before functions themselves warm up and link to them instead
139+
// of inlining.
140+
#define RESUME_INITIAL_VALUE 7917
138141
#define RESUME_INITIAL_BACKOFF 6
139142
static inline _Py_BackoffCounter
140143
initial_resume_backoff_counter(void)

0 commit comments

Comments
 (0)