I think if you do:
var startTime = new Date();
var a=0;
for(i=0;i<50000;i++){
a++;
}
console.log('ending: ', (new Date() - startTime) / 1000);
you will see same difference. Probably it just different javascript parsers.
Question
I'm trying to improve my jQuery performance and I've noticed it runs faster in Chrome than in other browsers. Does it make sense when it is just an AJAX call to a PHP file?
In order to test it, I am doing this on a click
event:
var startTime = new Date();
$.post("http://"+ document.domain + "action.json", { data: data},
function(dat){
console.log('ending: ', (new Date() - startTime) / 1000);
}
});
Result in seconds are:
Can the development tools to access the console on each browser interfere in this results?
Thanks.
Solution
I think if you do:
var startTime = new Date();
var a=0;
for(i=0;i<50000;i++){
a++;
}
console.log('ending: ', (new Date() - startTime) / 1000);
you will see same difference. Probably it just different javascript parsers.