There are more closures than necessary. Refactoring the code would make it faster. https://github.com/uWebSockets/uWebSockets/wiki/The-importance-of-JavaScript-scope-control