Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> GC languages can be siginificantly faster exactly because it doesn't have to clean those "garbage" at every step.

Which GC languages are significantly faster than Rust and C++?



It can happen in practice. For example, I see a lot of C++ code with extra string copying that would be hard to avoid. Like if some func takes a const vector<string>& and you have a string in any structure besides a vector, you're gonna copy that string.


(of course Java's pointers-everywhere approach has downsides and is generally slower, but there are scenarios where this works to your advantage)


So a theoretical GC language can hypothetically be faster than Rust or C++.

Which language? Does one exist?


It'd be Golang if anything. Java might have too much overhead to be faster than C++ without negligence, but that's not because of the GC.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: