On Fri, Nov 8, 2013 at 6:13 PM, Igor Bukanov <i...@mir2.org> wrote:

> On 9 November 2013 00:08, Huon Wilson <dbau...@gmail.com> wrote:
> > `&T` is pointer-sized but `T` isn't always.
>
> If the size of &T is not known, then obviously such optimization is
> not applicable, The point is about &T where T is fixed-sized 1-4 word
> thing.
>
> >
> > (I believe that LLVM will optimise references to pass-by-value in certain
> > circumstances; presumably when functions are internal to a compilation
> > unit.)
>
> But what about declaring that such optimization is always valid and
> even require it on the level of ABI?


If you're using dynamic linking, the call overhead makes the cost of having
an extra pointer in the CPU cache irrelevant.
_______________________________________________
Rust-dev mailing list
Rust-dev@mozilla.org
https://mail.mozilla.org/listinfo/rust-dev

Reply via email to