Skip to content

Commit

Permalink
Lessen the number of spesh threshold levels
Browse files Browse the repository at this point in the history
When something tiny called something a bit bigger, we could end up
with the call there not being able to specialize into a fast resolve
due to the callee potentially not being hot enough yet. Once things
get over a certain size that'll be noise, but there's plenty of cases
(tiny forwarding subs/methods delegating to slightly bigger impls)
that could benefit. So, collapse the lower levels to a single one.
  • Loading branch information
jnthn committed Jun 22, 2018
1 parent 2249d68 commit a75090c
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions src/spesh/threshold.c
Expand Up @@ -6,14 +6,10 @@ MVMuint32 MVM_spesh_threshold(MVMThreadContext *tc, MVMStaticFrame *sf) {
MVMuint32 bs = sf->body.bytecode_size;
if (tc->instance->spesh_nodelay)
return 1;
if (bs <= 256)
return 100;
else if (bs <= 512)
if (bs <= 2048)
return 150;
else if (bs <= 2048)
return 200;
else if (bs <= 8192)
return 250;
return 200;
else
return 300;
}

0 comments on commit a75090c

Please sign in to comment.