jquery vs js

Benchmark created by Piotr on


Test runner

Ready to run.

Testing in
TestOps/sec
jquery
var div1 = document.createElement("div");

div1.style.backgroundColor = "red" ;
div1.style.width = "50px"; 
div1.style.height = "100px"; 

x = 150; 
y = 250; 
$(div1).css({ "left": x, "top": y});
ready
js
var div2 = document.createElement("div");

div2.style.backgroundColor = "yellow" ;
div2.style.width = "100px"; 
div2.style.height = "50px"; 

x = 150; 
y = 250; 

div2.style.x = x; 
div2.style.y = y; 
ready

Revisions

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