On Thu, Jun 6, 2013 at 8:01 PM, Vadim <vadi...@gmail.com> wrote: > > The iterator object itself can contain a fixed size buffer into which it > copies objects before returning slice to the caller. This would work for > almost any container type. > > Perhaps I'm confused about the amount of inlining that Rust can perform. Do > you expect that iterator.next() calls will be inlined across crate > boundaries?
It can inline between crates as long as the functions/methods are marked with `#[inline]`. This causes the compiler to output the AST into the crate and add an inline hint. Statically dispatched function calls are fast though, just not when they're going to be in an inner loop like these ones. _______________________________________________ Rust-dev mailing list Rust-dev@mozilla.org https://mail.mozilla.org/listinfo/rust-dev