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:
4 months ago
keys
4K/s
values
2K/s
View exact numbers
Test name
Executions per second
✓
keys
4,349 Ops/sec
values
1,914 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));