News for hackers. Stuff that matters.
Re:Bun v0.5.7 by austin-cheney on Friday February 24, 2023 @04:36AM (#34922747)
I have been troubled by bun’s prior benchmarks for WebSockets. Node does not have a native WebSocket library so bun compares a popular Node package, ws, against itself. That’s fair and practical but problematic from two technical perspectives.

1) bun is stress testing message send, not message receive. I find that using a better optimized implementation on Node it takes Node about 9x longer to receive a message than to send it and that difference compounds with increase of message frequency. On my laptop with DDR4 2133mhz memory I can send at up to 450,000 messages per second on Node (as opposed to bun’s 700,000 messages per second) before hitting garbage collection problems but receiving is dramatically slower. I suspect bun will be dramatically faster than Node on message receive frequency but I would still like to see the numbers.

2) common Node implementations of WebSockets execute messaging as streams over an established HTTP socket. This is certainly not a bun problem but it does make for a poor comparison. WebSockets are dramatically faster when executed over sockets from Node’s Net/TLS libraries directly as HTTP is not need at any step (even though the greeting packet looks like HTTP).

Re:Bun v0.5.7 by Jarred on Friday February 24, 2023 @04:21AM (#34922657)
I work on Bun

Happy to answer any questions

Re:Bun v0.5.7 by yuuuzzzzzz on Friday February 24, 2023 @04:25AM (#34922679)
What font is being used for the shell in the screenshot here: https://user-images.githubusercontent.com/709451/220815500-3... ? And what theme is being used for it aswell? It looks very nice
Re:Bun v0.5.7 by Jarred on Friday February 24, 2023 @04:26AM (#34922686)
Hack, iirc

It’s oh-my-zsh’s default theme

Re:Bun v0.5.7 by yuuuzzzzzz on Friday February 24, 2023 @04:26AM (#34922691)
Cool, thanks!