From 80bd2a240b55cd465de36397c4cfa3cfec4d4ea1 Mon Sep 17 00:00:00 2001 From: Anna Henningsen Date: Sat, 14 Oct 2017 11:27:33 +0200 Subject: [PATCH] tools: minor performance improvement PR-URL: https://github.com/nodejs/node/pull/16125 Reviewed-By: Anna Henningsen --- tools/genv8constants.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/genv8constants.py b/tools/genv8constants.py index 45b4ae3171..b516728635 100755 --- a/tools/genv8constants.py +++ b/tools/genv8constants.py @@ -84,10 +84,10 @@ for line in pipe: # 6-character margin, 2-characters + 1 space for each field idx = 6 + i * 3; octetstr = line[idx:idx+3] - if not numpattern.match(octetstr): + if curr_octet > octets: break; - if curr_octet > octets: + if not numpattern.match(octetstr): break; curr_val += int('0x%s' % octetstr, 16) << (curr_octet * 8);