4 ms·
This is hard to answer as a one-liner; do you know about monomorphic vs. polymorphic code and static/dynamic dispatching? Rust is, by default statically dispatc
by GolDDranks 8y ago
This is hard to answer as a one-liner; do you know about monomorphic vs. polymorphic code and static/dynamic dispatching? Rust is, by default statically dispatched, so because the two kinds of iterators do different things, they have to be of different types.
- jeffdavis 8y agoAh, that makes sense, thank you. One iterator simply returns the value and increments, and the other needs to apply the filter first and potentially advance several times.