require "v8" require "Benchmark" TIMES=10 OBJECTS=100 js= <>> 19)) & 0xffffffff; test.seed = ((test.seed + 0x165667b1) + (test.seed << 5)) & 0xffffffff; test.seed = ((test.seed + 0xd3a2646c) ^ (test.seed << 9)) & 0xffffffff; test.seed = ((test.seed + 0xfd7046c5) + (test.seed << 3)) & 0xffffffff; test.seed = ((test.seed ^ 0xb55a4f09) ^ (test.seed >>> 16)) & 0xffffffff; return (test.seed & 0xfffffff) / 0x10000000; }; test.init = function() { test.objects = []; for(var i=0; i<#{OBJECTS}; i++) { var hash = {}; for(var j=0; j<10; j++) { var isString = test.random(); var key = "str" + test.random(); var value; if(isString < 0.5) value = "str" + test.random(); else value = test.random(); hash[key] = value; } test.objects[i] = hash; } return test.objects.length; } test.findSum = function() { test.summ = 0; var length = test.objects.length; for(var i=0; i