diff options
author | Karl Williamson <khw@cpan.org> | 2021-05-18 12:04:37 -0600 |
---|---|---|
committer | Karl Williamson <khw@cpan.org> | 2021-08-07 14:50:35 -0600 |
commit | 138daa9de5910dbd89190c9345fb07a0efbb5860 (patch) | |
tree | 489677d3cc7f282a4a7f4a615e8d914b37cdc855 /regcomp.c | |
parent | 320ae5fef6390c701c0fb885b5a5109ee65ce350 (diff) | |
download | perl-138daa9de5910dbd89190c9345fb07a0efbb5860.tar.gz |
regcomp.c: Add some branch predictors
Diffstat (limited to 'regcomp.c')
-rw-r--r-- | regcomp.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -9517,7 +9517,7 @@ Perl__invlist_search(SV* const invlist, const UV cp) PERL_ARGS_ASSERT__INVLIST_SEARCH; /* If list is empty, return failure. */ - if (high == 0) { + if (UNLIKELY(high == 0)) { return -1; } @@ -9526,7 +9526,7 @@ Perl__invlist_search(SV* const invlist, const UV cp) mid = invlist_previous_index(invlist); assert(mid >=0); - if (mid > highest_element) { + if (UNLIKELY(mid > highest_element)) { mid = highest_element; } |