{"ScriptPreparationCode":"function genArray(shape) {\r\n var random = function () { return Math.random(); };\r\n var arr = [];\r\n for (var i = 0; i \u003C 100; i\u002B\u002B) {\r\n arr.push(genShape(shape, random()));\r\n }\r\n return arr;\r\n}\r\nfunction genShape(shape, number) {\r\n shape = shape % 10;\r\n var obj = {};\r\n for (var i = 0; i \u003C shape; i\u002B\u002B) {\r\n obj[\u0022foo\u0022 \u002B i] = \u0022bar\u0022;\r\n }\r\n obj.a = number;\r\n for (i = shape; i \u003C= 10; i\u002B\u002B) {\r\n obj[\u0022bar\u0022 \u002B i] = \u0022foo\u0022;\r\n }\r\n return obj;\r\n}\r\nvar arr0 = genArray(0);\r\nvar arr1 = genArray(1);\r\nvar arr2 = genArray(2);\r\nvar arr3 = genArray(3);\r\nvar arr4 = genArray(4);\r\nvar arr5 = genArray(5);\r\nvar arr6 = genArray(6);\r\nvar arr7 = genArray(7);\r\nvar arr8 = genArray(8);\r\nvar arr9 = genArray(9);\r\nfunction doOverloadedTest() {\r\n var res = 0;\r\n res \u002B= sum(arr0);\r\n res \u002B= sum(arr1);\r\n res \u002B= sum(arr2);\r\n res \u002B= sum(arr3);\r\n res \u002B= sum(arr4);\r\n res \u002B= sum(arr5);\r\n res \u002B= sum(arr6);\r\n res \u002B= sum(arr7);\r\n res \u002B= sum(arr8);\r\n res \u002B= sum(arr9);\r\n return res;\r\n}\r\nfunction sum(arr) {\r\n var res = 0;\r\n for (var i = 0; i \u003C arr.length; i\u002B\u002B) {\r\n res \u002B= arr[i].a;\r\n }\r\n return res;\r\n}\r\n\r\nfunction sum0(arr) { var res = 0; for (var i = 0; i \u003C arr.length; i\u002B\u002B) {\r\n res \u002B= arr[i].a;\r\n} return res; }\r\nfunction sum1(arr) { var res = 0; for (var i = 0; i \u003C arr.length; i\u002B\u002B) {\r\n res \u002B= arr[i].a;\r\n} return res; }\r\nfunction sum2(arr) { var res = 0; for (var i = 0; i \u003C arr.length; i\u002B\u002B) {\r\n res \u002B= arr[i].a;\r\n} return res; }\r\nfunction sum3(arr) { var res = 0; for (var i = 0; i \u003C arr.length; i\u002B\u002B) {\r\n res \u002B= arr[i].a;\r\n} return res; }\r\nfunction sum4(arr) { var res = 0; for (var i = 0; i \u003C arr.length; i\u002B\u002B) {\r\n res \u002B= arr[i].a;\r\n} return res; }\r\nfunction sum5(arr) { var res = 0; for (var i = 0; i \u003C arr.length; i\u002B\u002B) {\r\n res \u002B= arr[i].a;\r\n} return res; }\r\nfunction sum6(arr) { var res = 0; for (var i = 0; i \u003C arr.length; i\u002B\u002B) {\r\n res \u002B= arr[i].a;\r\n} return res; }\r\nfunction sum7(arr) { var res = 0; for (var i = 0; i \u003C arr.length; i\u002B\u002B) {\r\n res \u002B= arr[i].a;\r\n} return res; }\r\nfunction sum8(arr) { var res = 0; for (var i = 0; i \u003C arr.length; i\u002B\u002B) {\r\n res \u002B= arr[i].a;\r\n} return res; }\r\nfunction sum9(arr) { var res = 0; for (var i = 0; i \u003C arr.length; i\u002B\u002B) {\r\n res \u002B= arr[i].a;\r\n} return res; }\r\n\r\nfunction doSplitTest() {\r\n var res = 0;\r\n res \u002B= sum0(arr0);\r\n res \u002B= sum1(arr1);\r\n res \u002B= sum2(arr2);\r\n res \u002B= sum3(arr3);\r\n res \u002B= sum4(arr4);\r\n res \u002B= sum5(arr5);\r\n res \u002B= sum6(arr6);\r\n res \u002B= sum7(arr7);\r\n res \u002B= sum8(arr8);\r\n res \u002B= sum9(arr9);\r\n return res;\r\n}\r\n\r\nvar sumSplit = (function () {\r\n var res = function sum(arr) {\r\n var res = 0;\r\n for (var i = 0; i \u003C arr.length; i\u002B\u002B) {\r\n res \u002B= arr[i].a;\r\n }\r\n return res;\r\n };\r\n res.sum0 = function sum(arr) { var res = 0; for (var i = 0; i \u003C arr.length; i\u002B\u002B) { res \u002B= arr[i].a; } return res; };\r\n res.sum1 = function sum(arr) { var res = 0; for (var i = 0; i \u003C arr.length; i\u002B\u002B) { res \u002B= arr[i].a; } return res; };\r\n res.sum2 = function sum(arr) { var res = 0; for (var i = 0; i \u003C arr.length; i\u002B\u002B) { res \u002B= arr[i].a; } return res; };\r\n res.sum3 = function sum(arr) { var res = 0; for (var i = 0; i \u003C arr.length; i\u002B\u002B) { res \u002B= arr[i].a; } return res; };\r\n res.sum4 = function sum(arr) { var res = 0; for (var i = 0; i \u003C arr.length; i\u002B\u002B) { res \u002B= arr[i].a; } return res; };\r\n res.sum5 = function sum(arr) { var res = 0; for (var i = 0; i \u003C arr.length; i\u002B\u002B) { res \u002B= arr[i].a; } return res; };\r\n res.sum6 = function sum(arr) { var res = 0; for (var i = 0; i \u003C arr.length; i\u002B\u002B) { res \u002B= arr[i].a; } return res; };\r\n res.sum7 = function sum(arr) { var res = 0; for (var i = 0; i \u003C arr.length; i\u002B\u002B) { res \u002B= arr[i].a; } return res; };\r\n res.sum8 = function sum(arr) { var res = 0; for (var i = 0; i \u003C arr.length; i\u002B\u002B) { res \u002B= arr[i].a; } return res; };\r\n res.sum9 = function sum(arr) { var res = 0; for (var i = 0; i \u003C arr.length; i\u002B\u002B) { res \u002B= arr[i].a; } return res; };\r\n return res;\r\n})();\r\n\r\nfunction doAutoSplitTest() {\r\n var res = 0;\r\n\r\n res \u002B= ((sumSplit \u0026\u0026 sumSplit.sum0) || sumSplit)(arr0);\r\n res \u002B= ((sumSplit \u0026\u0026 sumSplit.sum1) || sumSplit)(arr1);\r\n res \u002B= ((sumSplit \u0026\u0026 sumSplit.sum2) || sumSplit)(arr2);\r\n res \u002B= ((sumSplit \u0026\u0026 sumSplit.sum3) || sumSplit)(arr3);\r\n res \u002B= ((sumSplit \u0026\u0026 sumSplit.sum4) || sumSplit)(arr4);\r\n res \u002B= ((sumSplit \u0026\u0026 sumSplit.sum5) || sumSplit)(arr5);\r\n res \u002B= ((sumSplit \u0026\u0026 sumSplit.sum6) || sumSplit)(arr6);\r\n res \u002B= ((sumSplit \u0026\u0026 sumSplit.sum7) || sumSplit)(arr7);\r\n res \u002B= ((sumSplit \u0026\u0026 sumSplit.sum8) || sumSplit)(arr8);\r\n res \u002B= ((sumSplit \u0026\u0026 sumSplit.sum9) || sumSplit)(arr9);\r\n return res;\r\n}\r\n\r\n\r\nwindow.doOverloadedTest = doOverloadedTest;\r\nwindow.doSplitTest = doSplitTest;\r\nwindow.doAutoSplitTest = doAutoSplitTest;","TestCases":[{"Name":"Overloaded sum test","Code":"window.doOverloadedTest()","IsDeferred":false},{"Name":"Split sum test","Code":"window.doSplitTest()","IsDeferred":false},{"Name":"Auto split test","Code":"window.doAutoSplitTest()","IsDeferred":false}]}