Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
object keys vs stringify 2
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:133.0) Gecko/20100101 Firefox/133.0
Browser:
Firefox 133
Operating system:
Mac OS X 10.15
Device Platform:
Desktop
Date tested:
one year ago
Test name
Executions per second
stringify
5962058.0 Ops/sec
keys
7269469.0 Ops/sec
HTML Preparation code:
<!--your preparation HTML code goes here-->
Script Preparation code:
function makeTestData() { return { name: "Matheus de Sousa Martins", age: 30, phone: "999999999999" }; }
Tests:
stringify
JSON.stringify(makeTestData())
keys
const a = makeTestData() const b = a const keysA = Object.keys(a) const keysB = Object.keys(a) for (let i = 0; i < keysA.length; i++) { const key = keysA[i]; if (keysB.indexOf(key) < 0) { return; } if (a[key] !== b[key]) { return; } }