Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
Jason stringify vs object.keys
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (iPhone; CPU iPhone OS 17_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) CriOS/121.0.6167.171 Mobile/15E148 Safari/604.1
Browser:
Chrome Mobile iOS 121
Operating system:
iOS 17.2
Device Platform:
Mobile
Date tested:
2 years ago
Test name
Executions per second
Object.keys
11821984.0 Ops/sec
JSON string
937648.2 Ops/sec
Script Preparation code:
var obj = { "employees": [ { "id": 1, "name": "John Doe", "position": "Software Engineer", "department": "Development", "skills": ["JavaScript", "React", "Node.js"], "salary": 80000, "address": { "street": "123 Main St", "city": "Anytown", "state": "CA", "zip": "12345" } }, { "id": 2, "name": "Jane Smith", "position": "Project Manager", "department": "Management", "skills": ["Agile", "Scrum", "Communication"], "salary": 90000, "address": { "street": "456 Elm St", "city": "Othertown", "state": "NY", "zip": "67890" } }, { "id": 3, "name": "Alice Johnson", "position": "Quality Assurance Engineer", "department": "Quality Assurance", "skills": ["Testing", "Automation", "Selenium"], "salary": 70000, "address": { "street": "789 Maple Ave", "city": "Sometown", "state": "TX", "zip": "54321" } } ], "projects": [ { "id": 1, "name": "Project Alpha", "team": ["John Doe", "Jane Smith"], "budget": 100000, "deadline": "2024-12-31" }, { "id": 2, "name": "Project Beta", "team": ["Alice Johnson"], "budget": 50000, "deadline": "2024-06-30" } ], "departments": [ { "name": "Development", "manager": "John Doe", "employees": ["John Doe"] }, { "name": "Management", "manager": "Jane Smith", "employees": ["Jane Smith"] }, { "name": "Quality Assurance", "manager": "Alice Johnson", "employees": ["Alice Johnson"] } ] }
Tests:
Object.keys
Object.keys(obj).length === 0
JSON string
JSON.stringify(obj) === "{}"