Have you looked at the ES6 typed array constructor
http://people.mozilla.org/~jorendorff/es6-draft.html#sec-properties-of-the-%typedarray%-intrinsic-object
and instance methods
http://people.mozilla.org/~jorendorff/es6-draft.html#sec-properties-of-the-%typedarrayprototype%-object
In particular check out the from, copyWith, and fill methods.
In general, TC39’s approach in ES6 is for typed arrays to simply be a variant
of Array and all of the Array methods (except those that are not applicable to
fixed length arrays) are supported for typed arrays. Similarly, if there are
common array operations that are still missing we would want them to be added
for both Array and typed arrays.
Performance optimizatiuon in an implementation issues. That’s where you should
apply performance pressure.
Allen
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss