2 ms·
That’s right. And forget about the existing rustc compiler implement. If you have something in Rust like let a: HashMap = immutable_map.iter().map(…); then
by kstrauser 11mo ago
That’s right. And forget about the existing rustc compiler implement. If you have something in Rust like
let a: HashMap = immutable_map.iter().map(…);
then you can infer from the semantics that the ordering doesn’t matter and whether it can be parallelized. C doesn’t have the ability to express what you want to happen, just how to do it. That gives Rust far more opportunity for optimization than C possibly can have.
- seertaak 11mo agoC != C-derived languages In C++ this was possible already in C++03. OTOH, it wasn't until recently that you were able to write something like `std::array<T, N>` in rust. Even now, there are restrictions on the kinds of expressions that N can be. Just pointing out that this cuts both ways.