css vs hide

JavaScript performance comparison

Test case created by acatl

Preparation code

<script src="//ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js"></script>

Test runner

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

Java applet disabled.

Testing in unknown unknown
Test Ops/sec
using jquery
var element = $('<div></div>');
element.attr('data-id',1);
element.attr('data-field','field');
 
pending…
string
var element = $('<div data-id="1" data-field="field"></div>');
pending…

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

Compare results of other browsers

0 comments

Add a comment