We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b149c37 commit e650bf3Copy full SHA for e650bf3
Python/optimizer_analysis.c
@@ -353,7 +353,10 @@ optimize_uops(
353
_Py_uop_abstractcontext_init(ctx);
354
355
// Plenty of space and it's a loop, try to peel it.
356
- if (trace[trace_len - 1].opcode == _JUMP_TO_TOP && trace_len < (UOP_MAX_TRACE_LENGTH / 4)) {
+ // Note: loop peeling only seems to be beneficial at the moment
357
+ // for smaller tight loops.
358
+ // Bigger loops tend to produce too much jitted code and blow the icache.
359
+ if (trace[trace_len - 1].opcode == _JUMP_TO_TOP && trace_len < (UOP_MAX_TRACE_LENGTH / 10)) {
360
// 1 to skip the _START_EXECUTOR
361
// + 1 to copy the current instruction too.
362
for (int x = 1; x < trace_len + 1; x++) {
0 commit comments