{"ScriptPreparationCode":" var items = [];\r\n var names = [\u0027george\u0027, \u0027nick\u0027, \u0027jack\u0027, \u0027herodotus\u0027, \u0027joanne\u0027];\r\n for (var i = 0; i \u003C 2000; i\u002B\u002B) {\r\n var obj = {\r\n name: names[i % 5] \u002B \u0027-\u0027 \u002B i,\r\n age: i % 10 \u002B 15\r\n };\r\n items.push(obj);\r\n }\r\n \r\n function filter_callback(item) {\r\n return (item.age == \u002718\u0027);\r\n }\r\n \r\n function test_filter() {\r\n var aged_18_filter = items.filter(filter_callback);\r\n }\r\n \r\n function test_looptest_looptest_looptest_loop() {\r\n var aged_18_loop = [];\r\n for (var i = 0; i \u003C items.length; i\u002B\u002B) {\r\n if (items[i].age == \u002718\u0027) aged_18_loop.push(items[i]);\r\n }\r\n }\r\n\r\n function test_loop_optimized() {\r\n var length=items.length\r\n var aged_18_loop = new Array(length);\r\n for (var i = 0; i \u003C length; i\u002B\u002B) {\r\n if (items[i].age == \u002718\u0027) aged_18_loop=items[i];\r\n }\r\n }","TestCases":[{"Name":"test_filter","Code":"test_filter()","IsDeferred":false},{"Name":"test_loop","Code":"test_loop()","IsDeferred":false},{"Name":"test_loop_optimized","Code":"test_loop_optimized()","IsDeferred":false}]}