scan-max-index

JavaScript performance comparison

Test case created by oyiptong

Preparation code


      
      <script>
Benchmark.prototype.setup = function() {
  function shuffleArray(array) {
      for (var i = array.length - 1; i > 0; i--) {
          var j = Math.floor(Math.random() * (i + 1));
          var temp = array[i];
          array[i] = array[j];
          array[j] = temp;
      }
      return array;
  }
  
  var logData = [[-12.617553539580937,-14.928610815079924,-12.506913661436922,-13.433592934475158,-12.116579099359647,-10.701965116327958,-15.766616660455895,-12.478891632399085,-11.727956329776081,-16.635020553344702,-10.914994079754067,-11.761027910930565,-13.64971154871403,-13.07419260138368,-13.20659593330652,-12.002553784749063,-11.859576005883913,-16.67978302727259,-12.031088702307422,-14.68731682644387,-12.571484505377985,-10.54439208048684,-11.520681731380172,-11.596594789124456,-13.558834750991938,-13.633167781186472,-12.57998593484558,-12.413351544687893,-19.479220311614625,-13.176473984993205,-12.576219040798701,-12.444165622157088,-11.628363115355693,-12.467968645787959,-11.514336745217918,-13.812116829439795,-13.688970613103631,-13.456249370938615,-13.728712667018964,-16.899769037708484,-12.76929222326407,-9.887407093042587,-15.565342345160195,-15.197248363467182,-13.22866012214044,-13.970834220038485,-15.053336763962035,-14.522172321392075,-14.152432184695947,-11.3581668889794,-10.992070652774519,-13.752100167608873,-12.297586457592583,-12.467710073024186,-12.348078662992439,-13.112589023228477,-11.62417106349016,-14.088250720407071],
  [-3.720695898850107,-4.863433499762286,-3.9898818471025796,-7.150276245999542,-2.629828227634927,-2.792897734182504,-5.4715072635628355,-4.942255681304882,-4.166763346665372,-6.600171657784163,-3.2847591923683646,-3.8822749423850227,-4.785664302974838,-4.921516638047635,-4.562492282314993,-4.129897537074119,-4.293836505888779,-7.91523304873064,-4.021214938423646,-6.179890393126733,-2.9865417351766,-2.9557682923640156,-4.4218741627924985,-3.8034125746165683,-5.152559059930429,-4.175154385208301,-3.5145651366908646,-4.747779000658783,-7.35782823510603,-4.317029492696757,-3.977989677006093,-2.975047574436387,-4.156382086338673,-5.259232998385069,-4.575443752750841,-5.458834424449711,-5.320045137781826,-4.296855071802213,-5.808601469868942,-5.658048833416784,-4.565900120782173,-2.105013339669581,-8.448550021011725,-6.134587456554798,-4.348167321940436,-5.554716854328971,-5.897621467485887,-6.188826101499103,-4.082461092627423,-3.6979954241019715,-3.522261645130082,-4.979806336832283,-4.969146675603625,-3.8074652853609368,-3.790812387388264,-4.588389856758729,-4.363098327686061,-5.6453998080301355],
  [-12.44142970490776,-14.898474636148723,-12.168029441190008,-12.990084207125454,-11.780650443625118,-10.700395183566053,-15.897175065625763,-12.525868165646623,-11.840413521959773,-15.978507805699941,-11.077272967181933,-11.53127872096692,-13.96401640853512,-13.150394015207235,-13.292616003744389,-12.055790876156008,-12.121508796355727,-16.332324846685633,-11.729199999849344,-14.478784467197203,-12.204874767250818,-10.549400275429178,-11.573363446313387,-11.64865407827141,-13.863726085807368,-13.23733527660491,-11.686517513886715,-12.300813736536673,-17.41581999518148,-12.590169291511344,-12.432433355279487,-11.784144901460872,-11.274918622701524,-12.65355887596218,-11.558593355590418,-13.929232054419675,-13.832753266866888,-13.76092618132777,-14.529907278995424,-16.501049143921065,-12.691633234053425,-9.592142957630049,-15.149766147131412,-15.092113168053348,-12.618649663922291,-14.205841331887365,-15.078496491468465,-15.04114051303068,-13.692134433252697,-11.147472412270405,-10.994998647381415,-12.096119463120761,-12.254856007155297,-11.99307202751826,-12.091902863357248,-12.847186136520543,-11.7857940181718,-13.781041763206598],
  [-38.13430761336493,-46.11750137833391,-38.1115194926607,-44.68918693721092,-45.874809261100836,-33.98165238846345,-52.23702586575119,-40.22420769485223,-36.644256446854385,-45.572542512202254,-38.55623484963844,-35.07894634157581,-44.535944734025634,-38.567263129253185,-39.57998221477756,-37.07673360353932,-35.49060002831024,-43.65543826745621,-40.63158164024164,-43.12878297632484,-39.19098686884376,-35.472484782529854,-39.91496625992605,-40.79194992593026,-44.00720647997484,-37.08667792535617,-39.74021704128856,-42.42610194264378,-49.01273365566258,-37.93346128613188,-33.96730351992423,-35.9767216010049,-35.71748804326447,-37.80342792555236,-41.0068840491121,-41.98818969027416,-32.6158533698607,-37.14201887131923,-41.50168102288722,-46.662048213697304,-37.7630773025137,-33.24495266337729,-41.79370378348886,-35.17103275646468,-39.258083471597956,-36.67717799897091,-37.14580440838293,-41.468873989599246,-37.67221782114079,-36.75911220226706,-37.21458653450724,-45.85172974023569,-39.05610838772549,-41.68135586353114,-34.304535835403485,-38.71618253297674,-40.16086030678996,-43.33674099425754],
  [-66.37638875490676,-62.89362395749315,-61.66835985409461,-71.33295463486378,-80.34368978376293,-62.57751686852757,-69.63522728662008,-67.4731378569084,-67.0546196026425,-74.28317484579692,-63.50252994690749,-63.560823738629864,-54.46241049692679,-64.31365396793333,-72.99358500398692,-64.12725338295228,-60.983982033561055,-83.3923580093092,-71.83663400311345,-69.12497384397639,-58.816573292983676,-64.12174947019032,-67.16875566221839,-64.98075733575348,-73.09104242102431,-71.55593358263562,-63.56235670902039,-68.53380524566005,-85.39037934877176,-64.31642665343779,-70.10624857016217,-66.04166659301413,-65.40026370819176,-64.1183414017058,-59.86334852007501,-66.26700209374964,-60.73660795468512,-71.32399484541637,-57.05140258627249,-84.10304378330142,-74.53281621745086,-64.64732732792832,-59.993472605456624,-66.00223276967995,-73.42428354532095,-73.84904897376396,-73.99773611499417,-68.34834834085615,-71.37385720256049,-60.52013116105569,-63.0014565159143,-83.44982147234653,-69.8554508674234,-62.38500447170954,-69.9146485194201,-59.32673298285631,-64.73062580265746,-68.74654801650411],
  [-51.8916129300421,-57.82908965757603,-50.580981981505914,-53.34766158235559,-61.96792356479435,-48.57346568125392,-78.07407741397344,-58.03268814461844,-48.39277079707637,-52.63996908084372,-45.877416927113494,-50.07016281977558,-54.43696596858618,-54.869330697460846,-55.407025891960714,-54.34505319069594,-31.354524812301698,-74.25579569281251,-56.60367085164965,-58.25228607399305,-48.111273127266216,-43.19124951839224,-49.19133779351622,-41.56466782930908,-57.35472470132194,-56.97546701297963,-47.487652692387464,-49.65895293032399,-58.46253317087624,-53.74051793606205,-55.552031608422716,-53.40160588336183,-42.45001954561057,-44.59475877497607,-47.06065448151936,-47.40108552531866,-48.24839302335113,-64.23278106753914,-49.35484540783257,-74.77326840126048,-53.77044116219125,-35.38225600091137,-40.010919519082464,-43.10416587361222,-50.89129448306091,-58.23116297654224,-61.84970140617291,-48.357160793763015,-60.678212285606584,-39.672373919575904,-47.13623372701591,-55.38680814375077,-58.73182750687537,-44.91983878264224,-42.88920832670898,-46.87866397662745,-57.33284136394076,-67.81102221435319],
  [-12.666737981969776,-14.072660562369396,-12.479882081134306,-13.539206286722434,-12.1628179210492,-10.736252336675722,-16.7210850080502,-12.843659835923566,-11.762311790279536,-15.573414940895729,-11.437936837286264,-11.666384756821417,-14.34057960268684,-13.108526780297149,-13.18788451910925,-12.061457304616027,-12.282185696983888,-15.820281495458968,-11.956829191178397,-15.341435508063867,-12.51006941448742,-10.47012182306463,-11.665370121108506,-11.686215778744163,-13.625243180494953,-13.38985293563525,-11.901105002729906,-12.49946197593956,-17.778989680483257,-13.017980537775284,-12.559844404787285,-12.175557596739864,-11.91819367592575,-12.695681107288006,-11.83908331255396,-13.481641036331318,-14.331755162699253,-13.711983704303229,-13.6541138436001,-19.19197949984685,-12.83392774061737,-9.97326969069038,-15.429861782786674,-16.183735928974,-13.017868918730475,-13.959024017859234,-15.677291549864233,-15.010220742318,-13.509970671092766,-11.325057637188003,-10.90860732756866,-12.18687947189945,-12.143986147389052,-12.0692857386047,-12.280260245584886,-12.623683752996412,-11.732377415249417,-14.273109062069402],
  [-46.63931541236404,-55.178282747230114,-39.38956044401385,-51.67970639621832,-44.579296992866155,-32.022738954168105,-52.08177965754357,-42.67912934456746,-41.90220617130904,-39.05822337594641,-34.0700579727978,-39.46985132812483,-43.529960446998274,-44.895096514202834,-50.021313521373315,-42.87681068981651,-34.96294251342488,-47.369513434994,-40.82770728642326,-45.26034179593231,-44.58997144986569,-43.33977910721143,-40.13198848959598,-40.99778177289454,-50.41288519226619,-48.83061388473939,-40.47935073748026,-38.71469835380537,-46.00587851250939,-43.402195819156695,-43.69497823844221,-42.6552606442081,-42.3681665167579,-42.0603874205484,-38.66331552179187,-47.680550754689065,-42.70775868900853,-43.19752372508773,-45.0058965505204,-51.19990388513691,-53.32453422041934,-33.55406855772923,-40.573563921694344,-40.43173073295148,-45.70038544886626,-50.12471454827279,-47.08901395363529,-43.516689550968806,-46.38333506661628,-39.38875403932311,-40.25128521609403,-51.145144566833224,-43.821869168756635,-40.623324807445115,-43.53620606378688,-45.17437549526734,-39.616013061282445,-49.94015090074187],
  [-12.61654099672749,-14.850709014366576,-12.628567696841042,-12.9568397415301,-12.406470223616788,-10.80359734170477,-15.200923709195543,-12.759013127622904,-12.036450877679648,-15.95387851120473,-11.035684036984017,-11.667203429928875,-14.131766293547138,-13.08702998788244,-13.474459826260537,-12.036542383920402,-12.096015828738217,-17.27632467114228,-11.902844469951962,-14.833306469409662,-12.567903459710434,-10.469547179514972,-11.42465250887998,-11.657157869086904,-13.731066098133171,-13.424368029741537,-12.084882910601916,-12.278914578756579,-19.479220311614625,-12.750094405581635,-12.721918733052819,-12.16549250508719,-11.598304099769067,-12.360284266679244,-11.592109889622158,-14.164833254615353,-13.781657155028736,-13.978184091965206,-13.82328397820297,-19.19197949984685,-13.049778864247608,-9.940436862056739,-16.101486709033377,-14.951382217346548,-13.24064631115889,-14.017432443368538,-15.36356773289742,-15.25796073993391,-13.976835314060331,-11.293250992782875,-10.919618529583992,-12.380879554888491,-12.134682105761456,-12.330755763765406,-12.402271079384533,-13.159021163793467,-11.825420731213168,-14.42661807344269],
  [-3.720695898850107,-4.863433499762286,-3.9898818471025796,-7.150276245999542,-2.629828227634927,-2.792897734182504,-5.4715072635628355,-4.942255681304882,-4.166763346665372,-6.600171657784163,-3.2847591923683646,-3.8822749423850227,-4.785664302974838,-4.921516638047635,-4.562492282314993,-4.129897537074119,-4.293836505888779,-7.91523304873064,-4.021214938423646,-6.179890393126733,-2.9865417351766,-2.9557682923640156,-4.4218741627924985,-3.8034125746165683,-5.152559059930429,-4.175154385208301,-3.5145651366908646,-4.747779000658783,-7.35782823510603,-4.317029492696757,-3.977989677006093,-2.975047574436387,-4.156382086338673,-5.259232998385069,-4.575443752750841,-5.458834424449711,-5.320045137781826,-4.296855071802213,-5.808601469868942,-5.658048833416784,-4.565900120782173,-2.105013339669581,-8.448550021011725,-6.134587456554798,-4.348167321940436,-5.554716854328971,-5.897621467485887,-6.188826101499103,-4.082461092627423,-3.6979954241019715,-3.522261645130082,-4.979806336832283,-4.969146675603625,-3.8074652853609368,-3.790812387388264,-4.588389856758729,-4.363098327686061,-5.6453998080301355]];
  var data = [[0.0000033133409088908795,3.2853882571913105e-7,0.0000037009772134695998,0.0000014650913910449296,0.0000054681013762540516,0.00002250067798979839,1.4211678888286948e-7,0.000003806152839435568,0.000008065165468165308,5.963515705321796e-8,0.00001818353434390718,0.000007802800026491043,0.0000011803358412947944,0.0000020986996876281623,0.0000018384349235807751,0.000006128541376193419,0.000007070523709651111,5.7024603193110236e-8,0.000005956135445953862,4.181954932953319e-7,0.0000034695539901034748,0.000026340784447495786,0.000009922737358058647,0.000009197353400772066,0.0000012926259984877057,0.00000120002546425079,0.000003440182846822122,0.000004063964655546507,3.4696215525031262e-9,0.0000018946546382322402,0.0000034531660890047044,0.0000039406470503649545,0.000008909761225230911,0.000003847955284086555,0.000009985897151399681,0.0000010033994937411424,0.0000011348947834846383,0.0000014322708432836066,0.0000010906762219005854,4.5763956222143236e-8,0.000002846864845881203,0.000050810522294732755,1.73803176911401e-7,2.5114173812546487e-7,0.0000017983155762853533,8.561380332238457e-7,2.900139638372951e-7,4.932881645502965e-7,7.139647934643939e-7,0.000011673760944648708,0.000016834660821545835,0.000001065464005672679,0.000004562743559426025,0.000003848950389167233,0.0000043380801781172555,0.000002019644558387456,0.000008947189802853977,7.612905738147027e-7],
  [0.024217109321927773,0.0077239182392170045,0.01850190004377803,0.0007846472956927439,0.07209084439012094,0.06124348918777715,0.0042048895024382445,0.007138478066493585,0.01550235475891853,0.0013601345398263466,0.03744960215767608,0.020603899141478206,0.008348575921607763,0.007288069097686806,0.01043601700435567,0.016084526805836337,0.013652447001769394,0.0003651387831906029,0.017931166437179864,0.0020706548002009007,0.050461645052718586,0.05203866430509915,0.012011699296179398,0.022294560041190268,0.0057845826759324965,0.015372818136077925,0.029760741995282905,0.008670931966979451,0.0006375816344402228,0.013339449680295594,0.018723241291521725,0.05104500550902025,0.015664126986296302,0.005199291054382059,0.01030172674397963,0.004258516475884871,0.004892532882173517,0.013611298326853283,0.0030016250012812537,0.003489318502182291,0.010400513274012889,0.12184404889888671,0.00021421079144054084,0.002166618857947495,0.012930488301075198,0.003869163851498146,0.002745968432578639,0.00205223445475109,0.01686590597572347,0.024773136362400687,0.029532567393582024,0.0068753939391418524,0.006949075320941096,0.022204389479189988,0.02257725292337567,0.010169219097679379,0.012738857287927974,0.003533735302904012],
  [0.000003951443096413616,3.385904282852951e-7,0.000005193880557727473,0.000002282853854531648,0.000007651181759999262,0.000022536030284441376,1.2472243787217698e-7,0.000003631487675630735,0.000007207318989327447,1.1497998057428305e-7,0.00001545971472888456,0.000009818141393585269,8.619949639931403e-7,0.0000019447171508289813,0.0000016869034231212713,0.000005810808290806979,0.000005441211626939489,8.071633654260413e-8,0.000008055141297908952,5.151619770460701e-7,0.000005005992980110513,0.000026209194453265467,0.00000941352148603946,0.00000873079542515,9.529283823442103e-7,0.0000017827823847199773,0.000008406397676206351,0.0000045480420489071684,2.7315268778662022e-8,0.0000034053280087269675,0.000003987152044295596,0.000007624491688769414,0.000012687178737038151,0.0000031961650907611893,0.000009553591932592626,8.925064874926783e-7,9.829050958650795e-7,0.0000010561015829537927,4.894873201466475e-7,6.818446091212572e-8,0.00000307676070354125,0.0000682629800820176,2.6335414618491094e-7,2.789835079804544e-7,0.000003309711065012994,6.76832958774414e-7,2.8280831768194026e-7,2.9357270444758096e-7,0.0000011313098545271705,0.000014411667847696817,0.000016785441118128484,0.00000558112905116273,0.000004761937155083082,0.000006186927079811473,0.000005604712123847671,0.0000026335280772163068,0.000007611928374146431,0.0000010350697282704565],
  [2.744609942826776e-17,9.36318560069627e-21,2.807872525518802e-17,3.90600425838412e-20,1.1935029025756353e-20,1.745644810739097e-15,2.0594341757616228e-23,3.3950686409055122e-18,1.2178719605372938e-16,1.6147164163721715e-20,1.7998651244982073e-17,5.826492246668425e-16,4.5528669154905833e-20,1.7801247598400464e-17,6.465946848483023e-18,7.902767205837435e-17,3.8603639229688845e-16,1.0982066151023305e-19,2.2590627924101313e-18,1.859548638051017e-19,9.540489601440725e-18,3.9309326190515726e-16,4.625411842221605e-18,1.9243374909598097e-18,7.725259233119007e-20,7.824569003955683e-17,5.508622724171446e-18,3.7547241641780596e-19,5.17654782063675e-22,3.355112476056937e-17,1.7708734066897216e-15,2.374150969151196e-16,3.076748767977101e-16,3.821024786455188e-17,1.5521601793519245e-18,5.81782846775665e-19,6.8409254695657515e-15,7.403313791086026e-17,9.46343801903633e-19,5.4316271001404516e-21,3.9783584258046956e-17,3.646703947487855e-15,7.066836907460213e-19,5.313914360810359e-16,8.921358224266371e-18,1.1784305242165978e-16,7.375341251283338e-17,9.779054253626768e-19,4.3567604265838505e-17,1.085726432102987e-16,6.885102685107875e-17,1.2213687054926424e-20,1.0918114451895127e-17,7.907098523944515e-19,1.26394851046987e-15,1.5338241292770984e-17,3.617095541180537e-18,1.5104018973962277e-19],
  [1.4897062336882504e-29,4.848932833168977e-28,1.651093270607241e-27,1.0483140928898314e-31,1.2799083464459017e-35,6.65165526221518e-28,5.725389580927287e-31,4.974948072725513e-30,7.560468711754138e-30,5.4856370060842544e-33,2.6375558051413844e-28,2.488198277432568e-28,2.2247214904017985e-24,1.1720198594095393e-28,1.9919976348203714e-32,1.4121723900382954e-28,3.2733550800571805e-27,6.069586200347649e-37,6.334994671778861e-32,9.536857596889382e-31,2.8594780977101236e-26,1.419966292482372e-28,6.744970577991543e-30,6.014723386418479e-29,1.8070226656594754e-32,8.387893306444024e-32,2.484386865284902e-28,1.7224497386236394e-30,8.230561060799626e-38,1.1687747178918492e-28,3.574728798300759e-31,2.0819419830060934e-29,3.9539061485235924e-29,1.4248138906340526e-28,1.0038713722469404e-26,1.6619067754577e-29,4.1920486657779714e-27,1.0577489705781248e-31,1.6706699916524003e-25,2.982031135629345e-37,4.273750809368289e-33,8.395034237981702e-29,8.813854913612407e-27,2.1656811418514706e-29,1.2949077155497741e-32,8.467701438545847e-33,7.297792855012428e-33,2.0734304316361195e-30,1.0063004450843651e-31,5.205242807028123e-27,4.353264780796007e-28,5.730638573638274e-37,4.5937055851432e-31,8.063745349309501e-28,4.329661499811325e-31,1.7168297731661188e-26,7.724073607008945e-29,1.3923664384990818e-30],
  [2.909101320221094e-23,7.676185624225879e-26,1.0788439642393416e-22,6.782736604521478e-24,1.2236937469523013e-27,8.031781545949774e-22,1.238394456897839e-34,6.262154362222283e-26,9.622472504870055e-22,1.3764229352518313e-23,1.1903946999590328e-20,1.7980616545561638e-22,2.2820547956563097e-24,1.480991112709443e-24,8.650364276008494e-25,2.50174638290421e-24,2.414920795361503e-14,5.6379040606564624e-33,2.614195686134843e-25,5.0275176022508887e-26,1.2750862528402355e-21,1.7469427296364671e-19,4.329855858164443e-22,8.885750600707282e-19,1.2335579345899354e-25,1.8024742635381664e-25,2.378890637901272e-21,2.7126312791669603e-22,4.074219713339942e-26,4.579199933212587e-24,7.482715167497011e-25,6.426540370932081e-24,3.665985599462595e-19,4.292816674193183e-20,3.646006544937325e-21,2.5940008862714722e-21,1.1117039512849733e-21,1.2707427045807326e-28,3.676740544286787e-22,3.3603316267526367e-33,4.4442053081586694e-24,4.302109513741817e-16,4.2022166287163e-18,1.9058934347884334e-19,7.910275858328696e-23,5.134843887704767e-26,1.3772601191000793e-27,9.971302846396817e-22,4.4441348928024556e-27,5.895313742179759e-18,3.3806000585692817e-21,8.827035087944449e-25,3.112371298230608e-26,3.101429323226679e-20,2.362944333038173e-19,4.37375967276766e-21,1.2608498287952827e-25,3.548519859183605e-30],
  [0.000003154318845944206,7.732522138270716e-7,0.0000038023849064499497,0.0000013182489082434638,0.000005221019226298249,0.00002174226846114904,5.471734918565164e-8,0.000002642831081802385,0.000007792788600779437,1.7240578201731345e-7,0.00001077871892915118,0.000008577356803198526,5.915145220007904e-7,0.000002027865531708862,0.0000018731584913365334,0.000005777974873290327,0.000004633557172811652,1.3469114485326099e-7,0.000006415271801085637,2.174198613092807e-7,0.0000036893162525722407,0.000028371602555318503,0.000008586064112359863,0.000008408934564522472,0.0000012095729669833593,0.0000015305966432989105,0.000006782905535651083,0.000003728658740623852,1.8996906620480636e-8,0.000002220050670534921,0.000003510175910512148,0.000005154927025076058,0.00000666797944358774,0.0000030643315390525743,0.000007216912612186798,0.0000013963609367929063,5.967574051335342e-7,0.0000011090755757047667,0.000001175151075663906,4.6241211768809085e-9,0.0000026686769288963084,0.00004662984875367964,1.9901974763737096e-7,9.364676717185915e-8,0.000002220298484300303,8.663091396787477e-7,1.5539562541927166e-7,3.0279169523800544e-7,0.0000013573576247835503,0.000012066740160283193,0.000018300039721075893,0.0000050968927332698995,0.000005320271897367182,0.0000057329189671019596,0.000004642487456607126,0.0000032930915518546184,0.00000802958738709339,6.328014924121913e-7],
  [5.556517374465612e-21,1.0873673337955986e-24,7.8222421223813e-18,3.595743348382382e-23,4.359707059932137e-20,1.2379445060196342e-14,2.405306844089862e-23,2.9153428314954636e-19,6.340201787207038e-19,1.0895047170547483e-17,1.5979449894274266e-15,7.218739446526729e-18,1.2450258837841e-19,3.179122914435541e-20,1.8880763839313648e-22,2.392421605579897e-19,6.543151790149793e-16,2.677205476583934e-21,1.856743946823455e-18,2.206395225116608e-20,4.3134170542660995e-20,1.505820089375539e-19,3.723049849093235e-18,1.5663528649202103e-18,1.2763275512702412e-22,6.210604046169876e-22,2.6305183983701484e-18,1.5361022892829348e-17,1.0468894588466532e-20,1.4147048853175582e-19,1.0556308269232873e-19,2.9857653799733647e-19,3.9786805734664813e-19,5.412598795317495e-19,1.617094562518711e-17,1.961552395343166e-21,2.833061921642593e-19,1.736016362850979e-19,2.845689261350993e-20,5.809841289597866e-23,6.941431431820184e-24,2.677029641630056e-15,2.394005135285624e-18,2.7588141757614795e-18,1.420936854862505e-20,1.7026017079272626e-22,3.544060129774898e-21,1.261658614353108e-19,7.177505406422261e-21,7.828552559161906e-18,3.3043720584176496e-18,6.136856080586093e-23,9.298310259500316e-20,2.2777927146724355e-18,1.2372741615633917e-19,2.4044624489233666e-20,6.237120469232539e-18,2.0477080537320647e-22],
  [0.0000033166975076124555,3.551558909702135e-7,0.000003277047488683364,0.0000023600217059559285,0.000004092026541854252,0.000020326251262294897,2.5022039956703196e-7,0.0000028762789581557977,0.0000059242830784628705,1.1784701800369982e-7,0.00001611622487861095,0.000008570337625448738,7.288730275626568e-7,0.000002071930062238844,0.0000014064245893679345,0.000005923740994391623,0.000005581707477997775,3.1404185047614095e-8,0.000006771117149529547,3.613905998836857e-7,0.000003482000894553221,0.00002838791079898516,0.000010922862275195881,0.000008656865355641893,0.000001088112408606764,0.0000014786692504950876,0.000005644195361251419,0.000004648738903217124,3.4696215525031262e-9,0.000002902046426337065,0.0000029849763531233304,0.000005207073828995143,0.000009181645695200533,0.000004285453116578877,0.000009238695244171177,7.051655389925682e-7,0.0000010344329507782635,8.498685963303777e-7,9.922567146581136e-7,4.6241211768809085e-9,0.0000021505673557363144,0.00004818624928962229,1.0167476371974963e-7,3.2114207279785816e-7,0.000001776889292142326,8.171587574751876e-7,2.1266073534255917e-7,2.3634795316427204e-7,8.510156537040815e-7,0.000012456711639700719,0.000018099639634551292,0.00000419809563857088,0.00000537000291957337,0.000004413882970363571,0.000004109245679024165,0.0000019280119497472025,0.000007316190922454886,5.427494326883186e-7],
  [0.024217109321927773,0.0077239182392170045,0.01850190004377803,0.0007846472956927439,0.07209084439012094,0.06124348918777715,0.0042048895024382445,0.007138478066493585,0.01550235475891853,0.0013601345398263466,0.03744960215767608,0.020603899141478206,0.008348575921607763,0.007288069097686806,0.01043601700435567,0.016084526805836337,0.013652447001769394,0.0003651387831906029,0.017931166437179864,0.0020706548002009007,0.050461645052718586,0.05203866430509915,0.012011699296179398,0.022294560041190268,0.0057845826759324965,0.015372818136077925,0.029760741995282905,0.008670931966979451,0.0006375816344402228,0.013339449680295594,0.018723241291521725,0.05104500550902025,0.015664126986296302,0.005199291054382059,0.01030172674397963,0.004258516475884871,0.004892532882173517,0.013611298326853283,0.0030016250012812537,0.003489318502182291,0.010400513274012889,0.12184404889888671,0.00021421079144054084,0.002166618857947495,0.012930488301075198,0.003869163851498146,0.002745968432578639,0.00205223445475109,0.01686590597572347,0.024773136362400687,0.029532567393582024,0.0068753939391418524,0.006949075320941096,0.022204389479189988,0.02257725292337567,0.010169219097679379,0.012738857287927974,0.003533735302904012]];
  
  data.forEach(function(value, index){
    data[index] = shuffleArray(data[index]);
  });
  logData.forEach(function(value, index){
    logData[index] = shuffleArray(logData[index]);
  });

};
</script>

Test runner

Warning! For accurate results, please disable Firebug before running the tests. (Why?)

Java applet disabled.

Testing in CCBot 2.0.0 / Other 0.0.0
Test Ops/sec
Loop of log sums
var indexes = [];
logData.forEach(function(dataArray){
  var max_value = -Infinity;
  var max_index = -1;
  dataArray.forEach(function(value, index){
    if(value > max_value) {
      max_value = value;
      max_index = index;
    }
  });
  indexes.push(max_index);
});
pending…
Math.max.apply of log sums
var indexes = [];
logData.forEach(function(dataArray){
 indexes.push(dataArray.indexOf(Math.max.apply(Math, dataArray)));
});
pending…
Loop of probability products
var indexes = [];
data.forEach(function(dataArray){
  var max_value = -Infinity;
  var max_index = -1;
  dataArray.forEach(function(value, index){
    if(value > max_value) {
      max_value = value;
      max_index = index;
    }
  });
  indexes.push(max_index);
});
pending…
Math.max.apply of probability products
var indexes = [];
data.forEach(function(dataArray){
 indexes.push(dataArray.indexOf(Math.max.apply(Math, dataArray)));
});
pending…

Compare results of other browsers

Revisions

You can edit these tests or add even more tests to this page by appending /edit to the URL.

0 Comments