Vanilla JS V Jquery Hide

JavaScript performance comparison

Test case created by Christian Stone

Info

Proof That Jquery SUCKS!!!.. Actually just testing this http://forum.yola.com/yola/topics/whyjqueryisbetterthanregularjavascript

Preparation code

<div id="Stupid_Div">Stupid Crap</div><script src="//ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
 

Preparation code output

Stupid Crap

Test runner

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

Java applet disabled.

Testing in unknown unknown
Test Ops/sec
Jquery
$('#Stupid_Div').hide();
pending…
Vanilla JS
document.getElementById("Stupid_Div").style.display = "none";
pending…
Vanilla JS Retarded Suggestion
var hide = "none";//this var isnt needed
document.getElementById("Stupid_Div").style.display = hide;
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:

2 comments

Michael commented :

Actually you entirely missed the point of his comment. And your test names are just mean.

Shawn commented :

I agree. I understand that jQuery is slower. But oh well.

Add a comment