I am in the process of writing a javascript library for multiple precision arithmetic. Essentially, storing a number as an array of digits and applying operations on them.
I have recently discovered javascript's Typed Arrays, and am considering rewriting using something like a Uint8Array, and expanding to a new buffer when the size must increase.
Is the performance increase of fixed size Uint8Arrays worth the performance loss of increasing the buffer via the TypedArray.prototype.set method every few operations or so?
Essentially, my question is if it is viable to use typed arrays when dealing with arrays of not-necessarily fixed length