From: Charles Oliver Nutter Date: 2008-12-06T04:57:24+09:00 Subject: [ruby-core:20387] Re: Leave my open classes alone (was Behavior: autoload calls rb_require() directly) Brent Roman wrote: > Paul, > > As we all know, Ruby > Integers are 32-bits or 64-bits wide, but Fixnums are somewhat smaller. > They get transparently promoted by Bignums as needed. > Similarly, a 64-bit VM could define SmallFloats. These would be a floats > few bits > short of 64-bits that are promoted to a full Floats as needed. > This video presentation of Allan Ottis at RubyConf 2008 explains > what gemstone did in their proprietary MagLev VM: There's a lot of interest in adding value types and tagged numerics to the JVM, and I believe some work has already started on it. Currently JRuby doesn't even have tagged Fixnums, though the speed of allocation and young gen GC on the JVM makes up for it (we're still comfortably faster than 1.9 on numeric benchmarks). However long term we'll need them to really show full-speed arithmetic on the JVM, and since several languages have said the same thing, they're likely to be added. Here's an article by John Rose, one of the folks responsible for Hotspot's optimizing JIT: http://blogs.sun.com/jrose/entry/fixnums_in_the_vm As with all features, John never makes it sound particularly difficult to add. By this time next year, the JVM may have fixnums, fast dynamic dispatch, tail calls, continuations, value types/tuples, interface injection, and a whole lot more. - Charlie