Sign in
webkit
/
WebKit
/
6b7c45f751131450b1675ef5b4b89fb3a0e35aba
/
.
/
JSTests
/
microbenchmarks
/
string-repeat-single-resolving.js
blob: b5d2581980417b9e400cb2c4625076b25f46c1ef [
file
] [
log
] [
blame
]
function
test
(
str
,
count
)
{
var
repeated
=
str
.
repeat
(
count
);
// Expand the rope.
return
repeated
[
0
]
+
repeated
[
count
>>
1
]
+
repeated
[
repeated
.
length
-
1
];
}
for
(
var
i
=
0
;
i
<
1e4
;
++
i
)
test
(
' '
,
i
);