HTML Preparation code:
AخA
 
1
<html>
2
<head>
3
  <script src='https://cdnjs.cloudflare.com/ajax/libs/ramda/0.27.1/ramda.min.js'></script>
4
</head>
5
<body></body>
6
</html>
Script Preparation code:
x
 
window.testData = {}
for (i = 0; i < 10000; i++) {
    window.testData['key' + i] = i
}
Tests:
  • Ramda (while loop inside)

     
    R.forEachObjIndexed((value, key) => console.log(value), window.testData)
  • Native ES5 Object.values + Array.map

     
    Object.values(window.testData).map(value => console.log(value))
Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results

Experimental features:

  • Test case name Result
    Ramda (while loop inside)
    Native ES5 Object.values + Array.map

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: one year ago)
Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/119.0
Firefox 119 on Windows
View result in a separate tab
Test name Executions per second
Ramda (while loop inside) 15.8 Ops/sec
Native ES5 Object.values + Array.map 15.2 Ops/sec