Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
JSON vs splits text
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (iPhone; CPU iPhone OS 18_6 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) CriOS/129.0.6668.69 Mobile/15E148 Safari/604.1
Browser:
Chrome Mobile iOS 129
Operating system:
iOS 18.6
Device Platform:
Mobile
Date tested:
9 months ago
Test name
Executions per second
Json
8509.0 Ops/sec
Text
9845.7 Ops/sec
HTML Preparation code:
<!--your preparation HTML code goes here-->
Script Preparation code:
const chars = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'; const dataArray = []; for (let i = 0; i < 1000; i++) { const subArray = []; const numSubparts = Math.floor(Math.random() * 5) + 1; for (let j = 0; j < numSubparts; j++) { const len = Math.floor(Math.random() * 100) + 1; let str = ''; for (let k = 0; k < len; k++) { str += chars[Math.floor(Math.random() * chars.length)]; } subArray.push(str); } dataArray.push(subArray); } // Format 1: JSON string const jsonData = JSON.stringify(dataArray); // Format 2: Double-delimited string const splitData = dataArray.map(arr => arr.join(';')).join(',');
Tests:
Json
/*When writing async/deferred tests, use `deferred.resolve()` to mark test as done*/ JSON.parse(jsonData)
Text
splitData.split(',').map(p => p.split(';'))