This repository has been archived on 2026-09-15. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
OxideJS/tests/stress/call_new_proto.js
T

15 lines
249 B
JavaScript

var ITERATIONS = 20000;
function Animal(name) {
this.name = name;
}
Animal.prototype.getName = function () {
return this.name;
};
var sum = 0;
for (var i = 0; i < ITERATIONS; i++) {
var a = new Animal("x");
sum += a.getName().length;
}
sum