Sign in
chromium
/
external
/
github.com
/
WebKit
/
webkit
/
refs/heads/main
/
.
/
JSTests
/
microbenchmarks
/
regexp-forward-reference.js
blob: a3cf17eec3c53af2377e70cda32f517a5d9a479d [
file
] [
edit
]
(
function
()
{
const
iterations
=
2000000
;
let re1
=
/\2(a)(b)/
;
let re2
=
/\k<y>(?<x>a)(?<y>b)/
;
for
(
let i
=
0
;
i
<
iterations
;
++
i
)
{
re1
.
test
(
"ab"
);
re1
.
test
(
"xx"
);
re2
.
test
(
"ab"
);
re2
.
test
(
"xx"
);
}
})();