tools: minor performance improvement
PR-URL: https://github.com/nodejs/node/pull/16125 Reviewed-By: Anna Henningsen <anna@addaleax.net>
This commit is contained in:
parent
695b307cc6
commit
80bd2a240b
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user