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
monomorphization option.
2014-07-26 5:31 GMT+02:00 Patrick Walton pcwal...@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 [1] (scroll down to
Mozilla's New JavaScript Value Representation) which avoid having to box
every floating point value.
Patrick
[1] http://evilpie.github.io/sayrer-fatval-backup/cache.aspx.htm
___
Rust-dev mailing list
Rust-dev@mozilla.org
https://mail.mozilla.org/listinfo/rust-dev
___
Rust-dev mailing list
Rust-dev@mozilla.org
https://mail.mozilla.org/listinfo/rust-dev