/home/travis/build/MoarVM/MoarVM/src/spesh/threshold.c
Line | Count | Source (jump to first uncovered line) |
1 | | #include "moar.h" |
2 | | |
3 | | /* Choose the threshold for a given static frame before we start applying |
4 | | * specialization to it. */ |
5 | 311k | MVMuint32 MVM_spesh_threshold(MVMThreadContext *tc, MVMStaticFrame *sf) { |
6 | 311k | MVMuint32 bs = sf->body.bytecode_size; |
7 | 311k | if (tc->instance->spesh_nodelay) |
8 | 0 | return 1; |
9 | 311k | if (bs <= 2048) |
10 | 276k | return 150; |
11 | 35.1k | else if (bs <= 8192) |
12 | 33.3k | return 200; |
13 | 35.1k | else |
14 | 1.81k | return 300; |
15 | 311k | } |