You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

30 lines
542 B

/*
* Basic property write performance
*/
if (typeof print !== 'function') { print = console.log; }
function test() {
var obj = { xxx1: 1, xxx2: 2, xxx3: 3, xxx4: 4, foo: 123 };
var i;
for (i = 0; i < 1e7; i++) {
obj.foo = 234;
obj.foo = 234;
obj.foo = 234;
obj.foo = 234;
obj.foo = 234;
obj.foo = 234;
obj.foo = 234;
obj.foo = 234;
obj.foo = 234;
obj.foo = 234;
}
}
try {
test();
} catch (e) {
print(e.stack || e);
throw e;
}