Performance of uWebSockets.js in Bun #931
|
Which should have better performance, using |
Replies: 5 comments 10 replies
|
The problem with JavaScript is that it is a script. So any abstraction adds runtime cost. Right now Bun exposes (only) a Fetch-style JS API with Request and Response objects, which obviously is more abstract (GC) than the function-only interface of uWS.js (non-GC). |
|
They should expose the same API as uWS for Http/ws. They don't even have basic settings working, no progress on issue I opened oven-sh/bun#2988 idleTimeout doesn't work I will try import uWS into Zig and code server in Zig next, nice low level language |
|
Both Is it also true for |
|
Sorry for additional question in this topic, But does switching to bun will give us better performance? Node has serious amount of libraries, that don't work with bun. Is it really worth the change? |
|
It's your task to solve your problems, in whatever way, using whatever tools you decide to use. Nobody is going to decide for you, that's not part of this project. |
Now, I once tried to benchmark the performance of
node.js&bun.sh.Tested using
autocannon.Tested on my 8-year old laptop having 2-core 2GB RAM with
Windows10installed and runningResults -
These are tested at 23% Cpu Usage & 65% Memory Usage on idle.
Code -