3 ms·
Took the time and refactored the perlin-noise port in the post to make it look a bit more like JavaScript. As a small side effect I got a 3x speed increase.
by BonsaiDen 15y ago
Took the time and refactored the perlin-noise port in the post to make it look a bit more like JavaScript.
As a small side effect I got a 3x speed increase.
JS Engines are good at optimizing, but having a senseless 256 copy loop in every call doesn't really work out that well if you can have a memcpy with Array.slice().
See: http://jsperf.com/perlin-noise http://jsperf.com/perlin-noise