[rust-dev] Implementation of traits in Rust: could it be dynamic?
lionel.parreaux at gmail.com
Sun Jul 27 09:36:06 PDT 2014
I see. Thanks for the links, Greg Morrisett's notes are a great survey of
possible approaches to this problem.
It is funny because I had also come to the conclusion that JIT was the
neater solution, as long as JIT is available with the runtime... and you
don't have to implement it -- I guess it's even more complex than doing
runtime dictionary passing.
Has there been experiments using LLVM's JIT to implement polymorphism in
Rust? I'm not sure about the cost of JIT, though. Maybe it would not make
sense in Rust. Well, at least there should still be the static
2014-07-26 5:31 GMT+02:00 Patrick Walton <pcwalton at mozilla.com>:
> On 7/25/14 8:26 PM, Patrick Walton wrote:
>> Uniform value representations work well too (as
>> OCaml shows), but of course you'll pay a performance cost for that.
> Oh, note that Greg's notes are a little bit out of date when discussing
> the performance tradeoffs of uniform value representation. On 64 bit (and
> even on 32 bit) you can do NaN-boxed "fatvals"  (scroll down to
> every floating point value.
>  http://evilpie.github.io/sayrer-fatval-backup/cache.aspx.htm
> Rust-dev mailing list
> Rust-dev at mozilla.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Rust-dev