Procedural Textures in HTML5 Canvas
asserttrue.blogspot.com
asserttrue.blogspot.com
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().