The JS engine is impossible to leave out, as this is a JavaScript API and strings are very engine specific.
We spend many hours reading JavaScriptCore (the engine)’s code and when we wrote the code for Buffer and related APIs we spent a lot of time benchmarking and iterating on different approaches. A lot of performance work looks like this