I'll bet you could find a lot of little optimizations like these in common Node.js tools. I wonder how much of the speedup from various Rust/Go/etc replacements is just because nobody bothered to optimize the existing JS-based tools.
@nolan those "we rewrote it in X and now it's so much faster" is always an unfair comparison from the start, because you're comparing your old technical-indebted codebase with the thing you just re-implemented from a clean slate..