pretenure-lambda.js (268B)
1 let r = []; 2 3 let h = function (x) { 4 let y = x; 5 r.push(() => x); 6 } 7 8 function i(x) { 9 for (let i = 0; i < x; i++) { 10 h(i); 11 } 12 } 13 14 gc(); 15 16 print("Warm up"); 17 i(400); 18 minorgc(); 19 20 print("Baseline"); 21 i(400); 22 minorgc(); 23 24 print("Run"); 25 i(5000); // Warmup count is 1500