4 ms·
So, Go is garbage collected and seems to rely on compiler optimizations for optimizing heap allocations to stack allocations (where applicable). Meanwhile, Rust
by Dewie 12y ago
So, Go is garbage collected and seems to rely on compiler optimizations for optimizing heap allocations to stack allocations (where applicable). Meanwhile, Rust is centered around manual memory management, discourages heap allocation if you can use stack allocation, and even has (or plans to have) a library for choosing different allocators when those give better performance (which should give an inclination of at what level Rust aims for). And it leverages an existing compiler architecture for generating the native code.
Your hunch/gut feeling seems to be very off.
- SwellJoe 12y agoIt was based on lack of knowledge about Rust. I didn't know any of those things about Rust. I assumed it was similar to Go (garbage collected, at the least). As I mentioned, I don't know a lot about either language; less about Rust. Which is why I mentioned I'd like to see a discussion about why Rust was faster.