simplex noise comparison

JavaScript performance comparison

Revision 8 of this test case created by

Preparation code

<script src="https://rawgithub.com/mrdoob/three.js/master/examples/js/SimplexNoise.js"></script>
<script>ThreeSimplexNoise = SimplexNoise;</script>
<script src="https://rawgithub.com/jwagner/simplex-noise.js/master/simplex-noise.js"></script>

<script src="https://rawgithub.com/josephg/noisejs/master/perlin.js"></script>
      
<script>
Benchmark.prototype.setup = function() {
  simplex = new SimplexNoise();
  threeSimplex = new ThreeSimplexNoise();
  noise.seed(Math.random());

};
</script>

Preparation code output

Test runner

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

Java applet disabled.

Testing in CCBot 2.0.0 / Other 0.0.0
Test Ops/sec
simplex-noise
a = 0;
for (var x = 0; x < 32; x++) {
  for (var y = 0; y < 32; y++) {
    for (var z = 0; z < 32; z++) {
      a += simplex.noise3D(x / 8, y / 8, z / 8);
    }
  }
}
pending…
threejs-noise
b = 0;
for (var x = 0; x < 32; x++) {
  for (var y = 0; y < 32; y++) {
    for (var z = 0; z < 32; z++) {
      b += threeSimplex.noise3d(x / 8, y / 8, z / 8);
    }
  }
}
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.

0 Comments