, 1 min read
Fast Buffer-to-String conversion in JavaScript with a Lookup Table
2 thoughts on “Fast Buffer-to-String conversion in JavaScript with a Lookup Table”
, 1 min read
2 thoughts on “Fast Buffer-to-String conversion in JavaScript with a Lookup Table”
to cope with case, replacing “(s[0] == 116 || s[0] == 84)” with “(s[0] & 0xDF == 84)”
and the others accordingly, makes the codes slightly faster for me.
I am hoping that compilers can handle this optimization. Nevertheless, I have checked in a new Python script that can generate the code in this manner.