mirror of https://github.com/svaarala/duktape.git
Sami Vaarala
8 years ago
committed by
GitHub
7 changed files with 132 additions and 47 deletions
@ -0,0 +1,34 @@ |
|||
function test() { |
|||
var i; |
|||
var src = '[a-z]foo.bar.quux.baz{1,3}[a-zA-Z0-9]+$'; |
|||
var re; |
|||
|
|||
for (i = 0; i < 1e4; i++) { |
|||
re = new RegExp(src); re = new RegExp(src); re = new RegExp(src); re = new RegExp(src); re = new RegExp(src); |
|||
re = new RegExp(src); re = new RegExp(src); re = new RegExp(src); re = new RegExp(src); re = new RegExp(src); |
|||
re = new RegExp(src); re = new RegExp(src); re = new RegExp(src); re = new RegExp(src); re = new RegExp(src); |
|||
re = new RegExp(src); re = new RegExp(src); re = new RegExp(src); re = new RegExp(src); re = new RegExp(src); |
|||
re = new RegExp(src); re = new RegExp(src); re = new RegExp(src); re = new RegExp(src); re = new RegExp(src); |
|||
re = new RegExp(src); re = new RegExp(src); re = new RegExp(src); re = new RegExp(src); re = new RegExp(src); |
|||
re = new RegExp(src); re = new RegExp(src); re = new RegExp(src); re = new RegExp(src); re = new RegExp(src); |
|||
re = new RegExp(src); re = new RegExp(src); re = new RegExp(src); re = new RegExp(src); re = new RegExp(src); |
|||
re = new RegExp(src); re = new RegExp(src); re = new RegExp(src); re = new RegExp(src); re = new RegExp(src); |
|||
re = new RegExp(src); re = new RegExp(src); re = new RegExp(src); re = new RegExp(src); re = new RegExp(src); |
|||
re = new RegExp(src); re = new RegExp(src); re = new RegExp(src); re = new RegExp(src); re = new RegExp(src); |
|||
re = new RegExp(src); re = new RegExp(src); re = new RegExp(src); re = new RegExp(src); re = new RegExp(src); |
|||
re = new RegExp(src); re = new RegExp(src); re = new RegExp(src); re = new RegExp(src); re = new RegExp(src); |
|||
re = new RegExp(src); re = new RegExp(src); re = new RegExp(src); re = new RegExp(src); re = new RegExp(src); |
|||
re = new RegExp(src); re = new RegExp(src); re = new RegExp(src); re = new RegExp(src); re = new RegExp(src); |
|||
re = new RegExp(src); re = new RegExp(src); re = new RegExp(src); re = new RegExp(src); re = new RegExp(src); |
|||
re = new RegExp(src); re = new RegExp(src); re = new RegExp(src); re = new RegExp(src); re = new RegExp(src); |
|||
re = new RegExp(src); re = new RegExp(src); re = new RegExp(src); re = new RegExp(src); re = new RegExp(src); |
|||
re = new RegExp(src); re = new RegExp(src); re = new RegExp(src); re = new RegExp(src); re = new RegExp(src); |
|||
re = new RegExp(src); re = new RegExp(src); re = new RegExp(src); re = new RegExp(src); re = new RegExp(src); |
|||
} |
|||
} |
|||
try { |
|||
test(); |
|||
} catch (e) { |
|||
print(e.stack || e); |
|||
throw e; |
|||
} |
@ -0,0 +1,34 @@ |
|||
function test() { |
|||
var i; |
|||
var re = /[a-z]foo.bar.quux.baz{1,3}[a-zA-Z0-9]+$/; |
|||
var t; |
|||
var txt = 'gfoo!bar!quux!bazzzABBA'; |
|||
for (i = 0; i < 1e4; i++) { |
|||
t = re.exec(txt); t = re.exec(txt); t = re.exec(txt); t = re.exec(txt); t = re.exec(txt); |
|||
t = re.exec(txt); t = re.exec(txt); t = re.exec(txt); t = re.exec(txt); t = re.exec(txt); |
|||
t = re.exec(txt); t = re.exec(txt); t = re.exec(txt); t = re.exec(txt); t = re.exec(txt); |
|||
t = re.exec(txt); t = re.exec(txt); t = re.exec(txt); t = re.exec(txt); t = re.exec(txt); |
|||
t = re.exec(txt); t = re.exec(txt); t = re.exec(txt); t = re.exec(txt); t = re.exec(txt); |
|||
t = re.exec(txt); t = re.exec(txt); t = re.exec(txt); t = re.exec(txt); t = re.exec(txt); |
|||
t = re.exec(txt); t = re.exec(txt); t = re.exec(txt); t = re.exec(txt); t = re.exec(txt); |
|||
t = re.exec(txt); t = re.exec(txt); t = re.exec(txt); t = re.exec(txt); t = re.exec(txt); |
|||
t = re.exec(txt); t = re.exec(txt); t = re.exec(txt); t = re.exec(txt); t = re.exec(txt); |
|||
t = re.exec(txt); t = re.exec(txt); t = re.exec(txt); t = re.exec(txt); t = re.exec(txt); |
|||
t = re.exec(txt); t = re.exec(txt); t = re.exec(txt); t = re.exec(txt); t = re.exec(txt); |
|||
t = re.exec(txt); t = re.exec(txt); t = re.exec(txt); t = re.exec(txt); t = re.exec(txt); |
|||
t = re.exec(txt); t = re.exec(txt); t = re.exec(txt); t = re.exec(txt); t = re.exec(txt); |
|||
t = re.exec(txt); t = re.exec(txt); t = re.exec(txt); t = re.exec(txt); t = re.exec(txt); |
|||
t = re.exec(txt); t = re.exec(txt); t = re.exec(txt); t = re.exec(txt); t = re.exec(txt); |
|||
t = re.exec(txt); t = re.exec(txt); t = re.exec(txt); t = re.exec(txt); t = re.exec(txt); |
|||
t = re.exec(txt); t = re.exec(txt); t = re.exec(txt); t = re.exec(txt); t = re.exec(txt); |
|||
t = re.exec(txt); t = re.exec(txt); t = re.exec(txt); t = re.exec(txt); t = re.exec(txt); |
|||
t = re.exec(txt); t = re.exec(txt); t = re.exec(txt); t = re.exec(txt); t = re.exec(txt); |
|||
t = re.exec(txt); t = re.exec(txt); t = re.exec(txt); t = re.exec(txt); t = re.exec(txt); |
|||
} |
|||
} |
|||
try { |
|||
test(); |
|||
} catch (e) { |
|||
print(e.stack || e); |
|||
throw e; |
|||
} |
Loading…
Reference in new issue