HTML Preparation code:
AخA
 
1
<div id='xd' data-name="xD"></div>
Script Preparation code:
 
var e = (() => {
    const state = {
        name: 'xD'
    }
    
    const el = document.getElementById('xd')
    el.get_name = () => state.name
    return el
})()
Tests:
  • by data attribute

     
    const name = e.dataset.name
  • by function

     
    const name = e.get_name()
Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results

Experimental features:

  • Test case name Result
    by data attribute
    by function

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: 2 years ago)
Mozilla/5.0 (X11; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/110.0
Firefox 110 on Linux
View result in a separate tab
Test name Executions per second
by data attribute 7390529.5 Ops/sec
by function 628602944.0 Ops/sec