Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
jquery-html-empty
(version: 0)
Comparing performance of:
empty vs html vs innerHTML vs remove all
Created:
7 years ago
by:
Guest
Jump to the latest result
HTML Preparation code:
<script src='https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.js'></script> <div id="container">Lorem Ipsum Dolor Sit Amet <i>measurethat.net</i></div>
Script Preparation code:
var $container = $('#container');
Tests:
empty
$container.empty();
html
$container.html("");
innerHTML
$container[0].innerHTML = "";
remove all
$container.find('*').remove();
Rendered benchmark preparation results:
Suite status:
<idle, ready to run>
Run tests (4)
Previous results
Fork
Test case name
Result
empty
html
innerHTML
remove all
Fastest:
N/A
Slowest:
N/A
Latest run results:
No previous run results
This benchmark does not have any results yet. Be the first one
to run it!
Related benchmarks:
jQuery event On Performance
jQuery event On Performance
jQuery vs Native JS
Test 001 jQuery vs JS
Comments
Confirm delete:
Do you really want to delete benchmark?