5 ms·
That one looks to be more efficient too - all those `collect`s in the original are a tad concerning...
by bjz_ 10y ago
That one looks to be more efficient too - all those `collect`s in the original are a tad concerning...
- Animats 10y agoDo the "collects" mean that memory is allocated and the whole collection stored temporarily, or is this all iterative generators? (I thought I knew Rust, but I haven't used it for a year, and its usage has changed a lot even if the core language hasn't.)
- steveklabnik 10y agocollect will ... collect it all into some kind of data structure, so yeah, that version would be doing a bunch of allocation.