[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Public WebGL] typed array convenience
Being able to do typed array memcpys without allocating new typed array views would be very much preferred by Emscripten applications. A lot of Emscripten-generated garbage comes from this origin, and the impact of this to Firefox is being discussed at https://bugzilla.mozilla.org/show_bug.cgi?id=936168
In Emscripten specifically to implement memcpy, we have observed typed array .set() to be slower than manually looping over bytes for small copies, so in Emscripten, short <4K element memcpys do a for loop over the data, and only larger ones do a typed array .set() call. I suspect Florian's example of very small ~1K range of copying won't get any faster if there are JS function calls involved.