20 ms·
I like the benchmark comparison between Box and Trait approaches. It's not easy to find these comparisons. Regarding overall approach, Iterators are very flexi
by aazaa 6y ago
I like the benchmark comparison between Box and Trait approaches. It's not easy to find these comparisons.
Regarding overall approach, Iterators are very flexible, and I find it a little surprising that you get Iterator behavior (the Stream trait) without explicitly mentioning Iterator in the code.
If iterator performance is a concern in, for example, file I/O, there are ways to address that:
https://stackoverflow.com/questions/45882329/read-large-files-line-by-line-in-rust https://stackoverflow.com/questions/45882329/read-large-file...