0joshuaolson1 / factoradic

Invertible transformations on permutation representations, including an RNG-free in-place Fisher-Yates-Knuth shuffle https://www.npmjs.com/package/factoradic
https://www.npmjs.com/package/factoradic
Apache License 2.0
0 stars 0 forks source link

typed arrays #6

Open 0joshuaolson1 opened 7 years ago

0joshuaolson1 commented 7 years ago

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Typed_arrays

Supported in environments stuck at ES5?

var buffer = new ArrayBuffer(2(bytes) * desiredLength);
var array = new Uint16Array(buffer);

Should this affect the api, since an 'array' has both a buffer and a view?

0joshuaolson1 commented 6 years ago

Maybe a bad idea?:

https://github.com/indutny/bn.js/issues/129#issuecomment-257175476