I believe, nowadays, JavaScript engines such as V8 are always able to detect when an array has only numeric values in the 0-255
range and, thus, store it as an unboxed Uint8 array. As such, one could expect they're as efficient as the strongly typed counterparts. Having a single array type across your codebase is, though, much more convenient than having many.
In 2017, is there still a noticeable performance advantage in using Buffer
/Uint8Array
s rather than plain arrays?
via MaiaVictor
No comments:
Post a Comment