You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

15 lines
324 B

function test() {
var i;
var re = new RegExp('[\\u0000-\\uffff]+', '');
var t1 = Date.now();
for (i = 0; i < 1e6; i++) {
void re.test('foo\u1234\ucafebar\uffff\ufead');
}
print(((Date.now() - t1) / 1e6) + ' ms/test');
}
try {
test();
} catch (e) {
print(e.stack || e);
throw e;
}