You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The rough perf numbers reported toward the end of that bug show that only the trailing-garbage case of String#to_i still runs slower than other impls, and it does so due to a wasted BigInteger along the way. I file it here because it is still an issue and probably can be improved pretty easily.
The benchmark from that bug is still valid, but may have updates in the Rubinius repository.
The text was updated successfully, but these errors were encountered:
~/projects/jruby $ jruby -Xcompile.invokedynamic=true blah.rb
Calculating -------------------------------------
#to_i with an integer in a string
83.570k i/100ms
#to_i with a float in a string
139.337k i/100ms
#to_i with an empty string
157.295k i/100ms
#to_i with an integer and extra text
113.454k i/100ms
-------------------------------------------------
#to_i with an integer in a string
16.610M (±13.9%) i/s - 80.561M
#to_i with a float in a string
15.420M (±14.8%) i/s - 74.685M
#to_i with an empty string
37.093M (±17.9%) i/s - 176.957M
#to_i with an integer and extra text
7.003M (±10.6%) i/s - 34.490M
From http://jira.codehaus.org/browse/JRUBY-5620
The rough perf numbers reported toward the end of that bug show that only the trailing-garbage case of String#to_i still runs slower than other impls, and it does so due to a wasted BigInteger along the way. I file it here because it is still an issue and probably can be improved pretty easily.
The benchmark from that bug is still valid, but may have updates in the Rubinius repository.
The text was updated successfully, but these errors were encountered: