tedtestDomperf

JavaScript performance comparison

Revision 6 of this test case created by Ted

Info

Test DOM find performance

Preparation code

        <div id="popup">
          <span style="display: none;">
            1
          </span>
          <span style="display: inline;">
            2
          </span>
          <span style="display: none;">
            3
          </span>
          <span style="display: none;">
            4
          </span>
        </div>
<script src="http://yui.yahooapis.com/3.8.1/build/yui/yui-min.js"></script>

Preparation code output

Test runner

Warning! For accurate results, please disable Firebug before running the tests. (Why?)

Java applet disabled.

Testing in unknown unknown
Test Ops/sec
dom
YUI().use('node', function(Y) {
  Y.all("span").getStyle("display").indexOf("inline");
});
pending…
json
YUI().use('json', 'node', function(Y) {
  var jsonString = [{
    id: "0",
    url: "a.html",
    hasRendered: true
  }, {
    id: "1",
    url: "b.html",
    hasRendered: true
  }, {
    id: "2",
    url: "c.html",
    hasRendered: false
  }, {
    id: "3",
    url: "d.html",
    hasRendered: false
  }];
  jsonString[1].hasRendered === true;
});
pending…

Compare results of other browsers

Revisions

You can edit these tests or add even more tests to this page by appending /edit to the URL. Here’s a list of current revisions for this page:

0 comments

Add a comment