oven-sh / bun

Incredibly fast JavaScript runtime, bundler, test runner, and package manager – all in one
https://bun.sh
Other
73.6k stars 2.72k forks source link

Misleading websocket benchmark #9551

Closed lesleyrs closed 6 months ago

lesleyrs commented 6 months ago

What is the type of issue?

Documentation is confusing

What is the issue?

https://bun.sh/docs/api/websockets compares performance with ws library with a link to uwebsockets. But leaves out https://github.com/uNetworking/uWebSockets.js/commit/cd4b40cc93824cf6f5bbefa17a866e236ca1f0ad#diff-b335630551682c19a781afebcf4d07bf978fb1f8ac04c6bf87428ed5106870f5R11

That's a recent commit so I'm not implying any malice, but I don't see the value in a benchmark this way.

Where did you find it?

No response

e3dio commented 6 months ago

What exactly is misleading ? I don't see anything misleading. I see a well documented benchmark, clearly posted results, and a link to the library it's based on ?

lesleyrs commented 6 months ago

I linked to the UWS commit that mentions: ... even though µWebSockets.js for Node.js runs 80% faster than Bun.

which is useful information

e3dio commented 6 months ago

Have you benchmarked your app on multiple runtimes to compare ? Or you just go off a single number you found without a benchmark ?

lesleyrs commented 6 months ago

They are the library authors I don't see why they would make false claims, but I'm not here to argue just inform about this.

e3dio commented 6 months ago

I'm just trying to figure out where the "Misleading websocket benchmark" is, let me know if you find it

Jarred-Sumner commented 6 months ago

If you have trouble reproducing our benchmarks definitely feel free to open an issue or leave a comment and I’ll reopen, but I’m having trouble seeing where it’s misleading