HTML Preparation code:
AخA
 
1
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/ramda/0.27.1/ramda.min.js"></script>
Script Preparation code:
 
var data = {
    "glossary": {
        "title": "example glossary",
        "GlossDiv": {
            "title": "S",
            "GlossList": {
                "GlossEntry": {
                    "ID": "SGML",
                    "SortAs": "SGML",
                }
            }
        }
    }
}
Tests:
  • Ramda path

     
    R.path(['glossary', 'GlossDiv', 'GlossList', 'GlossEntry', 'ID'])(data)
  • Native path

     
    data.glossary.GlossDiv.GlossList.GlossEntry.ID
  • Native path with null check

     
    data?.glossary?.GlossDiv?.GlossList?.GlossEntry?.ID
Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results

Experimental features:

  • Test case name Result
    Ramda path
    Native path
    Native path with null check

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: 3 years ago)
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.164 Safari/537.36
Chrome 91 on Mac OS X 10.15.7
View result in a separate tab
Test name Executions per second
Ramda path 2837903.2 Ops/sec
Native path 16670450.0 Ops/sec
Native path with null check 16471182.0 Ops/sec