You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently a loader use String.fromCharCode for decoding a text from wasm-memory to JS-string.
I created test that compare current implementation with TextDecoder.
For popular browser (Safari, Chrome, Firefox) it faster that String.fromCharCode
For Safari on iOS14 TextDecoder is extrimely faster (about 10 times).
Currently a loader use
String.fromCharCode
for decoding a text from wasm-memory to JS-string.I created test that compare current implementation with TextDecoder.
For popular browser (Safari, Chrome, Firefox) it faster that
String.fromCharCode
For Safari on iOS14 TextDecoder is extrimely faster (about 10 times).
Test
https://esbench.com/bench/5f6c9945b4632100a7dcd322
Results
Left - FF (Latest), Right - Chrome (Latest)
IOS 14 Safari Ipda 2018
UPD:
For strings lequal 30 chars
String.fromCharCode
runs faster thatTextDecoder
in Chrome, for FF and Safari on my devices this does not apply.The text was updated successfully, but these errors were encountered: