sin-cos-tan speed test

JavaScript performance comparison

Test case created by Oliver Clevont

Preparation code

<script>
var i, t, pi = Math.PI/180*90;
</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
sin
for(i = 1; i <= 100; i++) {
  t = Math.sin(i/100*pi);
}
pending…
cos
for(i = 1; i <= 100; i++) {
  t = Math.cos(i/100*pi);
}
pending…
tan
for(i = 1; i <= 100; i++) {
  t = Math.tan(i/100*pi);
}
pending…
atan
for(i = 1; i <= 100; i++) {
  t = Math.atan(i/100*pi);
}
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