WebReflection / coincident

An Atomics based Proxy to simplify, and synchronize, Worker related tasks.
MIT License
203 stars 3 forks source link

Parsing the serialized string in one shot #3

Closed WebReflection closed 1 year ago

WebReflection commented 1 year ago

This MR would like to slightly improve performance by parsing the whole buffer in one go as unique fromCharCode String operation.

WebReflection commented 1 year ago

OK, it looks like in Chromium they are using btoa(fromCharCode(new UInt8Array(pngBuffer))) and in WebKit the arg size is an int32 which is plenty of chars ... I believe these days it's safe to just expect variable arity to deal with huge amount of arguments so that hacks like these needed in 2011 are not relevant anymore http://webreflection.blogspot.com/2011/07/about-javascript-apply-arguments-limit.html