js-test

JavaScript performance comparison

Test case created by G33X

Test runner

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

Java applet disabled.

Testing in unknown unknown
Test Ops/sec
The One if
var one = prompt('Enter a value')
if (one <= 10) {
  alert('one max 10')
}
if (one >= 11 && one < 100) {
  alert('one max 100')
}
if (one >= 100 && one <= 1000) {
  alert('one max 1000')
} else {
  alert('one max 1000+')
}
pending…
The One switch
var one = prompt('Enter a value')
if (one <= 10) {
  alert('one max 10')
} else if (one >= 11 && one <= 100) {
  alert('one max 100')
} else if (one > 100 && one <= 1000) {
  alert('one max 1000')
} else {
  alert('one max 1000+')
}
pending…
nono
var a= 0
for(i=1;i<10;i++)
{
for(i=1;i<10;i++)
{
for(i=1;i<10;i++)
{
for(i=1;i<10;i++)
{
a=i*i*i*i*i*i*i*i*i*i*i*i*i*i*i*i*i*i*i
}
}
}
}
alert(a)
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