3 ms·
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<st
by hot_gril 2y ago
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.
- hot_gril 2y ago(of course Java's pointers-everywhere approach has downsides and is generally slower, but there are scenarios where this works to your advantage)
- VWWHFSfQ 2y agoSo a theoretical GC language can hypothetically be faster than Rust or C++. Which language? Does one exist?
- hot_gril 2y agoIt'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.