Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/108.0.0.0 YaBrowser/23.1.2.978 Yowser/2.5 Safari/537.36
Yandex Browser 23
Mac OS X 10.15.7
Desktop
one year ago
Test name Executions per second
Ramda 55032.2 Ops/sec
JSON.stringify 339413.9 Ops/sec
HTML Preparation code:
AخA
 
1
<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:
  • Ramda

     
    var result = R.toString(data, [{foo: {bar: {foo: {bar: ''}}}}, {}, {}]);
  • JSON.stringify

     
    var result = JSON.stringify(data) === JSON.stringify([{foo: {bar: {foo: {bar: ''}}}}, {}, {}]);