jsPerf.app is an online JavaScript performance benchmark test runner & jsperf.com mirror. It is a complete rewrite in homage to the once excellent jsperf.com now with hopefully a more modern & maintainable codebase.
jsperf.com URLs are mirrored at the same path, e.g:
https://jsperf.com/negative-modulo/2
Can be accessed at:
https://jsperf.app/negative-modulo/2
A small change compared to edit 31 where your treating an object as a hash table/map (deleting/adding keys). For-in becomes incredibly slow on V8 (node, chrome, opera).
var i;
var key;
var keys;
var l;
var value;
var hasOwnProperty = {}.hasOwnProperty;
var obj = {"K":75,"]":93,"P":80,"C":67,"^":94,"W":87,"J":74,"D":68,"[":91,"E":69,"G":71,"T":84,"Q":81,"N":78,"_":95,"I":73,"X":88,"V":86,"M":77,"L":76,"S":83,"\\":92,"O":79,"Y":89,"R":82,"a":97,"H":72,"`":96,"B":66,"F":70,"Z":90,"U":85,"R0":82,"[1":91,"D2":68,"S3":83,"B4":66,"C5":67,"N6":78,"U7":85,"S8":83,"G9":71,"R10":82,"M11":77,"V12":86,"W13":87,"W14":87,"D15":68,"N16":78,"M17":77,"C18":67,"E19":69,"W20":87,"D21":68,"E22":69,"T23":84,"Y24":89,"]25":93,"Q26":81,"^27":94,"B28":66,"O29":79,"O30":79,"L31":76,"X32":88,"\\33":92,"Z34":90,"C35":67,"R36":82,"G37":71,"^38":94,"G39":71,"K40":75,"[41":91,"C42":67,"a43":97,"I44":73,"D45":68,"U46":85,"M47":77,"Z48":90,"G49":71,"X50":88,"V51":86,"^52":94,"B53":66,"H54":72,"B55":66,"T56":84,"F57":70,"H58":72,"T59":84,"[60":91,"W61":87,"]62":93,"I63":73,"X64":88,"U65":85,"a66":97,"P67":80,"`68":96,"D69":68,"M70":77,"B71":66,"U72":85,"W73":87,"L74":76,"N75":78,"E76":69,"V77":86,"`78":96,"U79":85,"H80":72,"B81":66,"E82":69,"P83":80,"Y84":89,"U85":85,"a86":97,"U87":85,"J88":74,"P89":80,"X90":88,"H91":72,"J92":74,"L93":76,"Q94":81,"\\95":92,"G96":71,"_97":95,"\\98":92,"B99":66,"Q100":81,"C101":67,"D102":68,"T103":84,"N104":78,"N105":78,"\\106":92,"a107":97,"^108":94,"B109":66,"D110":68,"Q111":81,"_112":95,"Z113":90,"^114":94,"J115":74,"^116":94,"S117":83,"`118":96,"J119":74,"D120":68,"T121":84,"P122":80,"H123":72,"L124":76,"I125":73,"C126":67,"N127":78,"S128":83,"S129":83,"G130":71,"P131":80,"`132":96,"H133":72,"[134":91,"[135":91,"M136":77,"V137":86,"Z138":90,"S139":83,"L140":76,"^141":94,"Z142":90,"]143":93,"L144":76,"Q145":81,"I146":73,"T147":84,"a148":97,"[149":91,"C150":67,"M151":77,"`152":96,"J153":74,"K154":75,"Z155":90,"\\156":92,"Z157":90,"G158":71,"T159":84,"_160":95,"R161":82,"V162":86,"F163":70,"O164":79,"P165":80,"K166":75,"G167":71,"R168":82,"E169":69,"D170":68,"`171":96,"]172":93,"H173":72,"T174":84,"a175":97,"R176":82,"D177":68,"P178":80,"K179":75,"P180":80,"F181":70,"Z182":90,"[183":91,"a184":97,"F185":70,"C186":67,"M187":77,"`188":96,"R189":82,"P190":80,"B191":66,"H192":72,"G193":71,"J194":74,"[195":91,"D196":68,"a197":97,"W198":87,"B199":66,"F200":70,"N201":78,"C202":67,"Q203":81,"Z204":90,"O205":79,"H206":72,"C207":67,"]208":93,"W209":87,"S210":83,"P211":80,"_212":95,"S213":83,"]214":93,"P215":80,"_216":95,"a217":97,"U218":85,"H219":72,"R220":82,"X221":88,"C222":67,"E223":69,"K224":75,"M225":77,"F226":70,"O227":79,"X228":88,"a229":97,"G230":71,"Z231":90,"G232":71,"Q233":81,"L234":76,"Y235":89,"O236":79,"a237":97,"^238":94,"Z239":90,"W240":87,"\\241":92,"E242":69,"a243":97,"I244":73,"L245":76,"P246":80,"Y247":89,"P248":80,"\\249":92,"Z250":90,"L251":76,"M252":77,"Z253":90,"B254":66,"J255":74,"\\256":92,"\\257":92,"U258":85,"`259":96,"_260":95,"I261":73,"a262":97,"X263":88,"M264":77,"`265":96,"_266":95,"D267":68,"J268":74,"S269":83,"S270":83,"T271":84,"`272":96,"_273":95,"L274":76,"F275":70,"V276":86,"V277":86,"Q278":81,"X279":88,"I280":73,"Z281":90,"Z282":90,"a283":97,"W284":87,"]285":93,"M286":77,"M287":77,"a288":97,"N289":78,"C290":67,"M291":77,"F292":70,"H293":72,"N294":78,"G295":71,"C296":67,"E297":69,"G298":71,"O299":79,"`300":96,"T301":84,"_302":95,"J303":74,"R304":82,"P305":80,"C306":67,"H307":72,"Q308":81,"T309":84,"H310":72,"Z311":90,"H312":72,"\\313":92,"O314":79,"R315":82,"C316":67,"X317":88,"C318":67,"L319":76,"Y320":89,"K321":75,"T322":84,"B323":66,"^324":94,"M325":77,"N326":78,"E327":69,"]328":93,"Z329":90,"R330":82,"\\331":92,"Y332":89,"M333":77,"D334":68,"Q335":81,"V336":86,"`337":96,"Z338":90,"F339":70,"[340":91,"J341":74,"P342":80,"O343":79,"J344":74,"Z345":90,"D346":68,"M347":77,"^348":94,"O349":79,"Q350":81,"I351":73,"O352":79,"I353":73,"^354":94,"P355":80,"U356":85,"Y357":89,"C358":67,"P359":80,"S360":83,"E361":69,"H362":72,"[363":91,"X364":88,"H365":72,"[366":91,"I367":73,"^368":94,"Q369":81,"H370":72,"G371":71,"O372":79,"Z373":90,"R374":82,"]375":93,"S376":83,"L377":76,"Z378":90,"S379":83,"E380":69,"R381":82,"R382":82,"Z383":90,"Q384":81,"R385":82,"V386":86,"D387":68,"a388":97,"O389":79,"a390":97,"I391":73,"N392":78,"X393":88,"M394":77,"C395":67,"I396":73,"I397":73,"`398":96,"L399":76,"G400":71,"R401":82,"I402":73,"C403":67,"J404":74,"D405":68,"I406":73,"K407":75,"K408":75,"`409":96,"D410":68,"U411":85,"Z412":90,"C413":67,"[414":91,"S415":83,"S416":83,"Q417":81,"\\418":92,"G419":71,"M420":77,"]421":93,"Z422":90,"E423":69,"K424":75,"B425":66,"^426":94,"E427":69,"F428":70,"Q429":81,"a430":97,"^431":94,"N432":78,"_433":95,"J434":74,"Q435":81,"R436":82,"O437":79,"O438":79,"Q439":81,"P440":80,"U441":85,"Y442":89,"N443":78,"[444":91,"`445":96,"O446":79,"Q447":81,"O448":79,"Y449":89,"E450":69,"_451":95,"M452":77,"I453":73,"I454":73,"Q455":81,"H456":72,"`457":96,"_458":95,"O459":79,"X460":88,"Y461":89,"H462":72,"W463":87,"B464":66,"Z465":90,"V466":86,"G467":71,"\\468":92,"`469":96,"E470":69,"]471":93,"U472":85,"`473":96,"[474":91,"U475":85,"X476":88,"C477":67,"Q478":81,"P479":80,"V480":86,"\\481":92,"B482":66,"S483":83,"V484":86,"H485":72,"^486":94,"P487":80,"Q488":81,"_489":95,"V490":86,"E491":69,"S492":83,"Y493":89,"^494":94,"T495":84,"R496":82,"W497":87,"K498":75,"Y499":89,"Z500":90,"J501":74,"B502":66,"C503":67,"W504":87,"\\505":92,"Y506":89,"L507":76,"L508":76,"K509":75,"G510":71,"C511":67,"B512":66,"U513":85,"a514":97,"S515":83,"F516":70,"W517":87,"J518":74,"T519":84,"D520":68,"H521":72,"`522":96,"`523":96,"`524":96,"V525":86,"a526":97,"X527":88,"B528":66,"`529":96,"_530":95,"D531":68,"G532":71,"O533":79,"V534":86,"K535":75,"a536":97,"P537":80,"J538":74,"I539":73,"I540":73,"_541":95,"Y542":89,"N543":78,"F544":70,"W545":87,"N546":78,"E547":69,"T548":84,"V549":86,"M550":77,"Q551":81,"C552":67,"J553":74,"W554":87,"\\555":92,"W556":87,"D557":68,"R558":82,"a559":97,"W560":87,"V561":86,"[562":91,"V563":86,"B564":66,"S565":83,"K566":75,"`567":96,"_568":95,"Y569":89,"`570":96,"W571":87,"Y572":89,"Y573":89,"N574":78,"Z575":90,"R576":82,"^577":94,"N578":78,"E579":69,"Y580":89,"W581":87,"M582":77,"J583":74,"^584":94,"D585":68,"_586":95,"R587":82,"Q588":81,"J589":74,"Z590":90,"O591":79,"W592":87,"B593":66,"V594":86,"G595":71,"J596":74,"_597":95,"\\598":92,"F599":70,"L600":76,"K601":75,"[602":91,"M603":77,"T604":84,"Q605":81,"H606":72,"L607":76,"N608":78,"Z609":90,"K610":75,"N611":78,"N612":78,"Y613":89,"L614":76,"M615":77,"D616":68,"Y617":89,"I618":73,"Q619":81,"R620":82,"B621":66,"R622":82,"X623":88,"D624":68,"\\625":92,"E626":69,"R627":82,"Q628":81,"N629":78,"]630":93,"[631":91,"K632":75,"O633":79,"Y634":89,"H635":72,"V636":86,"B637":66,"F638":70,"a639":97,"L640":76,"V641":86,"D642":68,"D643":68,"F644":70,"G645":71,"^646":94,"P647":80,"U648":85,"\\649":92,"W650":87,"B651":66,"P652":80,"G653":71,"W654":87,"U655":85,"I656":73,"X657":88,"I658":73,"[659":91,"G660":71,"U661":85,"_662":95,"D663":68,"`664":96,"^665":94,"O666":79,"_667":95,"K668":75,"^669":94,"\\670":92,"C671":67,"^672":94,"D673":68,"V674":86,"^675":94,"\\676":92,"L677":76,"I678":73,"Q679":81,"a680":97,"^681":94,"F682":70,"P683":80,"E684":69,"a685":97,"Y686":89,"D687":68,"R688":82,"Y689":89,"U690":85,"F691":70,"T692":84,"V693":86,"H694":72,"F695":70,"D696":68,"H697":72,"X698":88,"M699":77,"L700":76,"N701":78,"P702":80,"S703":83,"H704":72,"Y705":89,"O706":79,"_707":95,"B708":66,"X709":88,"L710":76,"L711":76,"F712":70,"F713":70,"Q714":81,"R715":82,"\\716":92,"Q717":81,"]718":93,"X719":88,"S720":83,"U721":85,"K722":75,"_723":95,"[724":91,"O725":79,"\\726":92,"L727":76,"T728":84,"L729":76,"M730":77,"B731":66,"\\732":92,"S733":83,"^734":94,"J735":74,"a736":97,"a737":97,"E738":69,"E739":69,"H740":72,"U741":85,"N742":78,"F743":70,"J744":74,"C745":67,"[746":91,"D747":68,"N748":78,"`749":96,"W750":87,"W751":87,"W752":87,"a753":97,"U754":85,"M755":77,"I756":73,"X757":88,"]758":93,"K759":75,"W760":87,"P761":80,"R762":82,"C763":67,"U764":85,"`765":96,"J766":74,"P767":80,"K768":75,"V769":86,"U770":85,"]771":93,"D772":68,"P773":80,"U774":85,"P775":80,"N776":78,"F777":70,"C778":67,"B779":66,"I780":73,"E781":69,"P782":80,"Y783":89,"P784":80,"Y785":89,"P786":80,"\\787":92,"O788":79,"X789":88,"_790":95,"O791":79,"^792":94,"G793":71,"]794":93,"Q795":81,"R796":82,"F797":70,"V798":86,"V799":86,"B800":66,"E801":69,"N802":78,"Z803":90,"]804":93,"Q805":81,"]806":93,"U807":85,"L808":76,"F809":70,"K810":75,"a811":97,"O812":79,"X813":88,"L814":76,"Q815":81,"Y816":89,"`817":96,"U818":85,"[819":91,"H820":72,"`821":96,"H822":72,"D823":68,"O824":79,"H825":72,"X826":88,"S827":83,"B828":66,"H829":72,"P830":80,"`831":96,"N832":78,"P833":80,"E834":69,"^835":94,"\\836":92,"Q837":81,"P838":80,"H839":72,"T840":84,"R841":82,"W842":87,"K843":75,"C844":67,"Z845":90,"U846":85,"L847":76,"W848":87,"B849":66,"S850":83,"B851":66,"R852":82,"F853":70,"P854":80,"L855":76,"X856":88,"]857":93,"W858":87,"F859":70,"V860":86,"W861":87,"V862":86,"\\863":92,"[864":91,"F865":70,"a866":97,"M867":77,"H868":72,"D869":68,"U870":85,"H871":72,"^872":94,"M873":77,"U874":85,"Y875":89,"O876":79,"X877":88,"B878":66,"U879":85,"Q880":81,"M881":77,"T882":84,"B883":66,"a884":97,"R885":82,"U886":85,"K887":75,"U888":85,"H889":72,"Y890":89,"C891":67,"`892":96,"W893":87,"V894":86,"C895":67,"]896":93,"J897":74,"`898":96,"U899":85,"N900":78,"[901":91,"a902":97,"a903":97,"O904":79,"C905":67,"S906":83,"C907":67,"T908":84,"[909":91,"_910":95,"U911":85,"Z912":90,"Q913":81,"T914":84,"^915":94,"K916":75,"G917":71,"B918":66,"U919":85,"L920":76,"[921":91,"K922":75,"L923":76,"T924":84,"Y925":89,"a926":97,"\\927":92,"V928":86,"W929":87,"P930":80,"S931":83,"U932":85,"_933":95,"M934":77,"Q935":81,"R936":82,"B937":66,"R938":82,"M939":77,"\\940":92,"R941":82,"Y942":89,"[943":91,"P944":80,"F945":70,"G946":71,"]947":93,"X948":88,"Y949":89,"V950":86,"D951":68,"H952":72,"P953":80,"_954":95,"^955":94,"I956":73,"K957":75,"G958":71,"]959":93,"a960":97,"_961":95,"W962":87,"T963":84,"Y964":89,"^965":94,"K966":75,"G967":71,"^968":94,"N969":78,"K970":75,"I971":73,"a972":97,"U973":85,"a974":97,"P975":80,"[976":91,"F977":70,"[978":91,"S979":83,"I980":73,"a981":97,"Q982":81,"P983":80,"S984":83,"N985":78,"D986":68,"_987":95,"^988":94,"F989":70,"Y990":89,"W991":87,"H992":72,"L993":76,"\\994":92,"G995":71,"M996":77,"X997":88,"Q998":81,"N999":78};
delete obj['h'];
obj['k'] = 11;
Ready to run.
Test | Ops/sec | |
---|---|---|
hasOwnProperty |
| ready |
Object.keys |
| ready |
Object.keys with forEach |
| ready |
Plain for...in |
| ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.