Skip to content

Commit 80bd2a2

Browse files
committed
tools: minor performance improvement
PR-URL: nodejs#16125 Reviewed-By: Anna Henningsen <[email protected]>
1 parent 695b307 commit 80bd2a2

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

tools/genv8constants.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,10 +84,10 @@ def out_define():
8484
# 6-character margin, 2-characters + 1 space for each field
8585
idx = 6 + i * 3;
8686
octetstr = line[idx:idx+3]
87-
if not numpattern.match(octetstr):
87+
if curr_octet > octets:
8888
break;
8989

90-
if curr_octet > octets:
90+
if not numpattern.match(octetstr):
9191
break;
9292

9393
curr_val += int('0x%s' % octetstr, 16) << (curr_octet * 8);

0 commit comments

Comments
 (0)