2 ms·
(0..1000).map(|x| x*2).sum() compiles to mov eax, 999000 Rust takes full advantage of its ownership, mutability, lifetime tracking and generics to have c
by pornel 7y ago
(0..1000).map(|x| x*2).sum()
compiles to
mov eax, 999000
Rust takes full advantage of its ownership, mutability, lifetime tracking and generics to have closures with zero overhead.