Sign in
webkit
/
WebKit
/
5969b6f1f74632b1546edb27bd956b187c2c3d52
/
.
/
JSTests
/
microbenchmarks
/
string-get-by-val.js
blob: f47cee5a9b690f0b0111237831d32fa6abbae451 [
file
] [
log
] [
blame
]
function
foo
(
string
)
{
var
result
;
for
(
var
i
=
0
;
i
<
1000000
;
++
i
)
result
=
string
[
0
];
return
result
;
}
var
result
=
foo
(
"x"
);
if
(
result
!=
"x"
)
throw
"Bad result: "
+
result
;