On 8/2/13 1:50 PM, Boris Zbarsky wrote:
On 8/2/13 4:47 PM, Jack Moffitt wrote:
Using a Reader doesn't imply that we're not reading from a character
buffer.
The question is whether the compiler can devirtualize at the callsite so
it can optimize around the read call, or possibly even inline it....
You can use:
fn read<T:Reader>(x: &T) { ... }
Which is devirtualized in the compiler front-end and if the methods are
small they will be inlined.
Patrick
_______________________________________________
dev-servo mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-servo