Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
keys vs values
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (X11; Linux x86_64; rv:148.0) Gecko/20100101 Firefox/148.0
Browser:
Firefox 148
Operating system:
Linux
Device Platform:
Desktop
Date tested:
one month ago
Test name
Executions per second
keys
4348.5 Ops/sec
values
1914.0 Ops/sec
Script Preparation code:
var testObj = {} for (let i = 0; i < 10000; i++) { const randomString = Math.random().toString(36).substr(2, 5); testObj[randomString] = randomString; }
Tests:
keys
console.log(Object.keys(testObj));
values
console.log(Object.values(testObj));