Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
Ramda vs json stringify
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:136.0) Gecko/20100101 Firefox/136.0
Browser:
Firefox 136
Operating system:
Mac OS X 10.15
Device Platform:
Desktop
Date tested:
one year ago
Test name
Executions per second
Stringify
22854.6 Ops/sec
Ramda
223396.9 Ops/sec
HTML Preparation code:
<script src="https://cdnjs.cloudflare.com/ajax/libs/ramda/0.25.0/ramda.min.js"></script>
Script Preparation code:
var data = [{foo: {bar: {foo: {bar: ''}}}}, {}, {}];
Tests:
Stringify
function obj2str (data) { return JSON.stringify(Object.keys(data) .sort() .reduce((acc, cur) => ( { ...acc, [cur]: data[cur] } ), {})) } var result = obj2str(data) === obj2str(JSON.stringify([{foo: {bar: {foo: {bar: ''}}}}, {}, {}]))
Ramda
var result = R.equals(data, [{foo: {bar: {foo: {bar: ''}}}}, {}, {}]);