Run results for: Maping BooleanArray vs uInt8 Array2 vs uint8 with bitMasking _2
compare the map speed of an array of random true/false values compared to an ArrayBuffer with a uInt8 view of 0 or 1. The results are that the typed array is much much faster. There are two possible reasons I can think of for this.
1) JavaScript boolean type size of 4Bytes where as an element of a uInt8 array is actually 1Byte.
2) The ArrayBuffer is allocating contiguous memory resulting in a better cache hit ratio.