uNetworking / uWebSockets

Simple, secure & standards compliant web server for the most demanding of applications
Apache License 2.0
17.4k stars 1.77k forks source link

Why is c++ uwebsocket version so badly benchmarked against uwebsocket js version? #1336

Closed superdolt closed 3 years ago

superdolt commented 3 years ago

https://www.researchgate.net/publication/348993267_An_Analysis_of_the_Performance_of_Websockets_in_Various_Programming_Languages_and_Libraries

what's wrong with the benchmark here?

ghost commented 3 years ago

Something that does not come as too much of a surprise is the fastest websocket. Although, my initial prediction was that C would perform the best, it is not unexpected that NodeJS takes the crown. Node’s asynchronous nature allows for greater throughput of requests coming into the server.

Hilarious since the "Node.js" websocket server is uWebSockets which is written in C and C++.

[...]

C++, and Rust performing the benchmark a little slower.

Directly contradicts the previous finding since here the "C++" websocket server is... again... uWebSockets.


You've already hit the nail on the head here - why would uWebSockets wrapped in Node.js outperform uWebSockets wrapped in nothing? And why are they measuring X (websocket implementations) and attributing the difference to Y (the programming language). This is exactly the same flaw TechEmpower does.

Essentially, this is garbage science. Just because a paper looks fancy with two columns of text, doesn't mean shit. And I'm saying that even though their "finding" put my work at the top.

superdolt commented 3 years ago

First of, big fan of your work. I'm newbie programmer so I doubt will understand the magic behind uwebsocket.

Since you mentioned techempower, someone asked me why you didnt submit a pull request to see how it performs.

You do have plenty of writeups with raspberry pi comparison etc. Possible to show how it performs under plaintext? pico v lang is now first for hello world.

ghost commented 3 years ago

Not interested in techempower as they are incompetent and don't understand what they are doing, like mentioned above. Besides, it is already an established fact uWS is quite optimal for what it does - benchmarks were more important in 2016/2018 since that was when the current architecture(s) were made.