HTML Preparation code:
AخA
 
1
<div id="foo">foo bar foo bar foo bar foo bar</div>
2
<script src='https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.js'></script>
Script Preparation code:
 
var foo = $("#foo");
Tests:
  • empty

     
    foo.empty();
  • html

     
    foo.html("");
  • innerHtml

     
    foo[0].innerHTML = "";
Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results

Experimental features:

  • Test case name Result
    empty
    html
    innerHtml

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: 2 days ago)
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.0.0 Safari/537.36
Chrome 134 on Mac OS X 10.15.7
View result in a separate tab
Test name Executions per second
empty 7969051.5 Ops/sec
html 4075484.5 Ops/sec
innerHtml 35260900.0 Ops/sec