History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: JRUBY-2180
Type: Bug Bug
Status: Open Open
Priority: Major Major
Assignee: Charles Oliver Nutter
Reporter: Charles Oliver Nutter
Votes: 0
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
JRuby

break performance is slower than MRI, sometimes slower than interpreted

Created: 26/Feb/08 11:19 AM   Updated: Monday 09:38 PM
Component/s: Compiler
Affects Version/s: JRuby 1.1RC2
Fix Version/s: JRuby 1.1+

Time Tracking:
Not Specified


 Description  « Hide
Ruby:
control, five short while loops  0.140000   0.000000   0.140000 (  0.145039)
control, five whiles with blocks  0.320000   0.000000   0.320000 (  0.318974)
five whiles that break          0.210000   0.000000   0.210000 (  0.239146)
control, five whiles with blocks  0.430000   0.000000   0.430000 (  0.431001)

JRuby interpreted:
control, five short while loops  0.156000   0.000000   0.156000 (  0.155000)
control, five whiles with blocks  0.331000   0.000000   0.331000 (  0.332000)
five whiles that break          0.457000   0.000000   0.457000 (  0.457000)
control, five whiles with blocks  1.027000   0.000000   1.027000 (  1.027000)

JRuby compiled:
control, five short while loops  0.050000   0.000000   0.050000 (  0.049000)
control, five whiles with blocks  0.269000   0.000000   0.269000 (  0.269000)
five whiles that break          0.047000   0.000000   0.047000 (  0.046000)
control, five whiles with blocks  0.782000   0.000000   0.782000 (  0.782000)


 All   Comments   Work Log   Change History      Sort Order: Ascending order - Click to sort in descending order
Charles Oliver Nutter - 27/Feb/08 10:44 PM
I read these numbers wrong; the compiled local break performance is 0.046, around 5 times faster than MRI. The non-local break performance is still slower, however, so I'll look into that.

Charles Oliver Nutter - 17/Mar/08 04:51 PM
We'll look to fix this after 1.1, since it's not really a huge issue.

Charles Oliver Nutter - 06/Oct/08 09:37 PM
Here's updated numbers; still slower than MRI for non-local breaks, but it has improved in the compiled case. Interpreted still seems to have some performance issues:
jruby compiled:
                                              user     system      total        real
control, five short while loops           0.023000   0.000000   0.023000 (  0.022774)
control, five whiles with blocks          0.276000   0.000000   0.276000 (  0.276131)
five whiles that break                    0.025000   0.000000   0.025000 (  0.024213)
five whiles with blocks that break        0.593000   0.000000   0.593000 (  0.593634)
jruby interpreted:
                                              user     system      total        real
control, five short while loops           0.078000   0.000000   0.078000 (  0.077959)
control, five whiles with blocks          0.256000   0.000000   0.256000 (  0.255260)
five whiles that break                    0.299000   0.000000   0.299000 (  0.299437)
five whiles with blocks that break        1.112000   0.000000   1.112000 (  1.112932)
MRI:
                                              user     system      total        real
control, five short while loops           0.150000   0.000000   0.150000 (  0.162975)
control, five whiles with blocks          0.350000   0.010000   0.360000 (  0.353873)
five whiles that break                    0.230000   0.000000   0.230000 (  0.234755)
five whiles with blocks that break        0.460000   0.000000   0.460000 (  0.481575)

The bad case at this point is really just the while loop with a breaking block. Still an issue, but better.