Test case details

Preparation Code

function T() { } T.prototype.myMethod = function(i) { if (i == 20000) { console.log('Hey T!'); } }; var t = new T(); function Tt() { this.myMethod = function(i) { if (i == 20000) { console.log('Hey Tt!'); } }; } var tt = new Tt();

Test cases

Test #1

for (var i = 1; i <= 20000; i++) { t.myMethod(i); }

Test #2

for (var i = 1; i <= 20000; i++) { tt.myMethod(i); }