diff options
-rw-r--r-- | numeric.c | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -335,10 +335,12 @@ Perl_grok_bin_oct_hex(pTHX_ const char *start, if (_generic_isCC(*s, class_bit)) { /* Write it in this wonky order with a goto to attempt to get the compiler to make the common case integer-only loop pretty tight. - With gcc seems to be much straighter code than old scan_hex. */ + With gcc seems to be much straighter code than old scan_hex. + (khw suspects that adding a LIKELY() just above would do the + same thing) */ redo: if (!overflowed) { - if (value <= max_div) { + if (LIKELY(value <= max_div)) { value = (value << shift) | XDIGIT_VALUE(*s); /* Note XDIGIT_VALUE() is branchless, works on binary * and octal as well, so can be used here, without |