3 ms·
Not really famous for how well they optimize compared to just writing the loop and iterate code naively with indices or what have you. Sure they are. The lo
by inferiorhuman 2y ago
Not really famous for how well they optimize compared to just writing
the loop and iterate code naively with indices or what have you.
Sure they are. The loop will have to bounds check at each iteration, the iterator won't necessarily have to. Collect may save on the number of allocations, etc, etc.
- dundarious 2y agoNeither of those are intrinsic issues.
- inferiorhuman 2y agoSo?
- dundarious 2y agoSo why compare it against an artificially hobbled alternative and say "that's the awesome power of Rust!" when it does a bit better. Compare it against an alternative that is not hobbled with extrinsic issues.