HTML Preparation code:
x
 
1
2
<script src='https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.js'></script>
Script Preparation code:
 
htmlstring = '<div class="pie"><a href="example.com"></div><br><p>blah</p><div class="something"><p>content</p></div>'
Tests:
  • jQuery(htmlstring)

     
    $(document.body).append($(htmlstring));
  • jQuery.parseHTML(htmlstring)

     
    $(document.body).append($.parseHTML(htmlstring));
Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results

Experimental features:

  • Test case name Result
    jQuery(htmlstring)
    jQuery.parseHTML(htmlstring)

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: 5 years ago)
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.120 Safari/537.36
Chrome 77 on Windows
View result in a separate tab
Test name Executions per second
jQuery(htmlstring) 18282.9 Ops/sec
jQuery.parseHTML(htmlstring) 3286.2 Ops/sec