▲ | Svenskunganka 2 days ago | |
The whole paper is not only full of misunderstandings, it is full of errors and contradictions with the implementations. - Rust is run in debug mode, by omitting the --release flag. This is a very basic mistake. - Some implementations is logging to stdout on each message, which will lead to a lot of noise not only due to the overhead of doing so, but also due to lock contention for multi-threaded benchmarks. - It states that the Go implementation is blocking and single-threaded, while it in fact is non-blocking and multi-threaded (concurrent). - It implies the Rust implementation is not multi-threaded, while it in fact is because the implementation spawns a thread per connection. On that note, why not use an async websocket library for Rust instead? They're used much more. - Gives VM-based languages zero time to warm up, giving them very little chance to do one of their jobs; runtime optimizations. - It is not benchmarking websocket implementations specifically, it is benchmarking websocket implementations, JSON serialization and stdout logging all at once. This adds so much noise to the result that the result should be considered entirely invalid. > To me, the champion is uWebSocket. That's the entire reason why "Node" wins [...] A big part of why Node wins is because its implementation is not logging to stdout on each message like the other implementations do. Add a console.log in there and its performance tanks. |