YUI V.S. Native DOM

Benchmark created by Zetaj on


Preparation HTML

<script src="http://yui.yahooapis.com/3.18.0/build/yui/yui-min.js"></script>
<script>
  Y = YUI().use('node');
</script>
<div id="container"></div>

Setup

var htmlContent = '<p><span>foo<span></p>';

Test runner

Ready to run.

Testing in
TestOps/sec
Native DOM - innerHTML
document.getElementById('container').innerHTML = htmlContent;
ready
YUI - setHTML
Y.one('#container').setHTML(htmlContent);
ready
YUI Mix Native DOM With innerHTML
Y.one(document.getElementById('container')).innerHTML = htmlContent;
ready
YUI Mix Native DOM With setHTML
Y.one(document.getElementById('container')).setHTML = htmlContent;
ready

Revisions

You can edit these tests or add more tests to this page by appending /edit to the URL.

  • Revision 1: published by Zetaj on