jsPerf.app is an online JavaScript performance benchmark test runner & jsperf.com mirror. It is a complete rewrite in homage to the once excellent jsperf.com now with hopefully a more modern & maintainable codebase .
jsperf.com URLs are mirrored at the same path, e.g:
https://jsperf.com/negative-modulo/2 Can be accessed at:
https://jsperf.app/negative-modulo/2 append vs. innerHTML vs. fragment (v21) Revision 21 of this benchmark created on October 30, 2013 Preparation HTML <script src ="https://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js" >
</script >
Setup var s = [
$('<a href="#" id="addButt"></a>' ),
$('<a href="#" id="horzButt"></a>' ),
$('<div class="divider"></div>' ),
$('<div id="layoutText">LAYOUT</div>' ),
$('<a href="#" class="vert-active" id="vertButt"></a>' ),
$('<a href="#" id="inspectButton"></a>' ),
$('<div id="inspectText">Inspect</div>' ),
$('<div class="presetPos" id="button">PRESETS</div>' ),
$('<div id="track"></div>' )];
var d = document .createElement ('div' );
document .body .appendChild (d);
Teardown
document .body .removeChild (d);
Test runner Ready to run.
Run Quick Run Testing in Test Ops/sec jQuery append $(d).append (s);
ready
innerHTML d.innerHTML = s;
ready
my fragment method var frag = document .createDocumentFragment ();
var elements = [];
while (s.length ) {
var el = s.shift ();
frag.appendChild (el[0 ]);
}
d.appendChild (frag);
ready
Revisions You can edit these tests or add more tests to this page by appending /edit to the URL.
Revision 1 : published by Lee Brimelow on May 11, 2013 Revision 2 : published by gloomybrain on May 11, 2013 Revision 3 : published by Lee Brimelow on May 11, 2013 Revision 5 : published by Miles Elam on May 15, 2013 Revision 6 : published by Miles Elam on May 15, 2013 Revision 10 : published on May 21, 2013 Revision 11 : published on May 23, 2013 Revision 12 : published by Lee Brimelow on May 24, 2013 Revision 14 : published by Raymond on May 28, 2013 Revision 15 : published by Raymond on May 28, 2013 Revision 16 : published on June 5, 2013 Revision 17 : published on June 6, 2013 Revision 18 : published by Matt Bilson on June 18, 2013 Revision 19 : published by Matt Bilson on June 18, 2013 Revision 20 : published by Tanel Liiv on September 27, 2013 Revision 21 : published on October 30, 2013 Revision 22 : published on November 21, 2013 Revision 23 : published on June 1, 2014 Revision 24 : published on July 6, 2014 Revision 25 : published on November 7, 2014 Revision 26 : published on December 1, 2014 Revision 27 : published by skyline on April 8, 2015 Revision 28 : published on May 1, 2015 Revision 29 : published on September 19, 2015 Revision 30 : published on September 19, 2015 Revision 31 : published on September 19, 2015 Revision 32 : published by bill on January 23, 2016