Sign in
webkit
/
WebKit
/
942f1c55789c2d11f989cfa1840f51c0777b0784
/
.
/
JSTests
/
microbenchmarks
/
polymorphic-structure.js
blob: a5bac8071875eea74e8ea9ddccb6f17789f4e2d4 [
file
] [
log
] [
blame
]
function
foo
(
o
)
{
return
o
.
f
;
}
var
o
=
{
f
:
42
};
var
result
=
0
;
for
(
var
i
=
0
;
i
<
500
;
++
i
)
{
for
(
var
j
=
0
;
j
<
10000
;
++
j
)
result
+=
foo
(
o
);
if
(
o
.
g
)
o
=
{
f
:
42
};
else
o
.
g
=
43
;
}
if
(
result
!=
210000000
)
throw
"Bad result: "
+
result
;