Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
Object vs Dictionary
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/137.0.0.0 Safari/537.36
Browser:
Chrome 137
Operating system:
Mac OS X 10.15.7
Device Platform:
Desktop
Date tested:
8 months ago
Test name
Executions per second
Object
386117.1 Ops/sec
Dictionary
3805.7 Ops/sec
HTML Preparation code:
<!--your preparation HTML code goes here-->
Script Preparation code:
/*your preparation JavaScript code goes here To execute async code during the script preparation, wrap it as function globalMeasureThatScriptPrepareFunction, example:*/ async function globalMeasureThatScriptPrepareFunction() { // This function is optional, feel free to remove it. // await someThing(); }
Tests:
Object
const OBJECT = { FIRST: "first", SECOND: "second", THIRD: "third", }; const perform = (item) => item; for (let i = 0; i< 10_000; i++) { perform(OBJECT.first); perform(OBJECT.second); perform(OBJECT.third); }
Dictionary
const proxy = new Proxy({}, { get: (_, p) => p }); const Dictionary = function () { return proxy; }; const DICTIONARY = new Dictionary(); const perform = (item) => item; for (let i = 0; i< 10_000; i++) { perform(DICTIONARY.first); perform(DICTIONARY.second); perform(DICTIONARY.third); }