Details
Description
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)
Activity
Charles Oliver Nutter
made changes -
| Field | Original Value | New Value |
|---|---|---|
| Fix Version/s | JRuby 1.1+ [ 13421 ] | |
| Fix Version/s | JRuby 1.1 [ 13990 ] |
Charles Oliver Nutter
made changes -
| Comment |
[ I made the following changes, which appear to help quite a bit: - Removed synchronization in searchMethod. Because it's only doing a get, and the methods hash is now a ConcurrentHashMap, this should be safe. Confirmation from others would be appreciated. - Modified the methods map load factor to 0.75 from 2.0, so the hash is more likely to have only one entry in a given bucket. These combined brought the numbers much closer but not quite down to MRI's times (best times shown): {noformat} MRI: control, 1 and :to_ary 0.180000 0.010000 0.190000 ( 0.178157) 1m 1.respond_to?(:to_ary) 0.380000 0.000000 0.380000 ( 0.481805) JRuby: control, 1 and :to_ary 0.150000 0.000000 0.150000 ( 0.150000) 1m 1.respond_to?(:to_ary) 0.500000 0.000000 0.500000 ( 0.500000) {noformat} I'll leave this bug open, since we know MRI and IronRuby have a separate cache for respond_to?, and we're still about 2x slower than MRI. ] |
Charles Oliver Nutter
made changes -
| Comment |
[ Oops, that last comment was for bug |
Charles Oliver Nutter
made changes -
| Status | Open [ 1 ] | Resolved [ 5 ] |
| Resolution | Fixed [ 1 ] | |
| Fix Version/s | JRuby 1.2 [ 14757 ] | |
| Fix Version/s | JRuby 1.x+ [ 13421 ] |
Charles Oliver Nutter
made changes -
| Status | Resolved [ 5 ] | Closed [ 6 ] |
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.