News for hackers. Stuff that matters.
Re:Rewriting Bun in Rust by m00dy on Thursday July 09, 2026 @01:22AM (#48841302)
yeap, unfortunately, only few can see this.
Re:Rewriting Bun in Rust by flohofwoe on Thursday July 09, 2026 @02:41AM (#48841826)
It depends a lot on the coding style. The sort of Rust code that's heavy on Rc, Arc, Box, RefCell etc... (e.g. the typical band-aids to work around borrow checker restrictions) will be slower than typical C++ code (it's also possible to kill performance in C++ of course, just use std::shared_ptr for everything). E.g. I'd wager that performant Rust code is trickier to write than performant C++ code because you'll have to design your entire Rust codebase around borrow checker restrictions, while C++ lets you 'cheat' without having to fall back to helper types that incur runtime overhead.
Re:Rewriting Bun in Rust by lostglass on Thursday July 09, 2026 @02:36AM (#48841796)
It's not though. It's fast enough for many applications but if you need to write a hypervisor then suddenly bounds checks and atomic pointers become significant. Not to mention that rust dramatically reduces your ability to control where memory is allocated.

I write in rust and c++, rust isn't as fast. Rust is easier to work with and, compared to the Java crap it's replacing at my work, it's a lot better but it's certainly not zero cost abstractions the way c++ can be, nor is it great for data oriented design because you're hoping the compiler will do the right thing, consistently.