What is being talked about is a single 16-bit write inside a byte buffer. The benchmark delta is 10ns per request (90ns for bit-twiddling vs 100ns for writeUInt16BE).
90ns/100ns is a lot for this kind of operation, but that comes from JS' handling of numbers and not a badly optimised routine.
90ns/100ns is a lot for this kind of operation, but that comes from JS' handling of numbers and not a badly optimised routine.