Coercing Fixnum and Float to Bignum is really slow
--------------------------------------------------
Key: JRUBY-2195
URL: http://jira.codehaus.org/browse/JRUBY-2195
Project: JRuby
Issue Type: Bug
Components: Performance
Affects Versions: JRuby 1.1RC2
Reporter: Charles Oliver Nutter
Fix For: JRuby 1.1
This could be the cause of JRUBY-2193 and JRUBY-2193. From Rubinius's
benchmark/rubinius/numerics/bm_coerce.rb
{noformat}
Ruby:
loop 0.650000 0.000000 0.650000 ( 0.722245)
Bignum#coerce Bignum 1.100000 0.010000 1.110000 ( 1.160798)
Bignum#coerce Fixnum 1.420000 0.000000 1.420000 ( 1.455305)
Fixnum#coerce Fixnum 1.100000 0.010000 1.110000 ( 1.125577)
Fixnum#coerce Bignum 1.330000 0.000000 1.330000 ( 1.369867)
Fixnum#coerce Float 1.190000 0.010000 1.200000 ( 1.193299)
Float#coerce Float 1.120000 0.000000 1.120000 ( 1.192579)
Float#coerce Bignum 1.210000 0.010000 1.220000 ( 1.221083)
Float#coerce Fixum 1.180000 0.000000 1.180000 ( 1.214208)
JRuby:
user system total real
loop 0.438000 0.000000 0.438000 ( 0.438000)
Bignum#coerce Bignum 0.564000 0.000000 0.564000 ( 0.563000)
Bignum#coerce Fixnum 0.520000 0.000000 0.520000 ( 0.520000)
Fixnum#coerce Fixnum 0.427000 0.000000 0.427000 ( 0.426000)
Fixnum#coerce Bignum 5.187000 0.000000 5.187000 ( 5.186000)
Fixnum#coerce Float 0.475000 0.000000 0.475000 ( 0.475000)
Float#coerce Float 0.547000 0.000000 0.547000 ( 0.547000)
Float#coerce Bignum 5.129000 0.000000 5.129000 ( 5.129000)
Float#coerce Fixum 0.478000 0.000000 0.478000 ( 0.479000)
{noformat}
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email