Permalink
Browse files

Reenable fast math operations.

Fast math ops had been disabled some time last year to further 1.9
compatibility, since several Fixnum operators had differing
behavior in 1.9 mode. The compiler complexities of making both the
1.8 and 1.9 paths optimizable were too great at the time, and also
introduce complexity that will eventually just go away once 1.9
logic is the only logic.

In order to reenable fast operators without breaking 1.9 mode, I
opted to remove the bifurcated "19" versions of those Fixnum
methods that have differing logic in favor of a boolean check to
do the same. This adds a bit of overhead to all of the operators
in question, but allows safely enabling fast operators, greatly
improving the performance of math (as it did before).

This commit also includes a small override for RubyFixnum's
convertToInteger(String) method, since there's no good reason
we should have have to do a hard redispatch back to Fixnum when
all we need is an Integer, regardless of what method is specified.
  • Loading branch information...
headius committed Aug 31, 2012
1 parent b247119 commit 13057bcd31e3b843cc0e00c87dd3ceceed85b919
Oops, something went wrong.

0 comments on commit 13057bc

Please sign in to comment.