I tested both the Unit8Array
[].slice.apply(new Uint8Array(n));
and the join/split method
new Array(n + 1).join('0').split('').map(parseFloat);
in jsPerf with interesting results. Chrome and Firefox were fairly slow on both counts (between 48,000 and 76,000 operations). But Opera and Safari both did amazingly well with the Uint8Array function (up to 438,000 operations). I think I'll start using Uint8Array and hope Chrome and Firefox improve.