Issue Type: Bug Bug
Affects Versions: JRuby 1.7.0.pre2
Assignee: Unassigned
Components: Core Classes/Modules, Ruby 1.9.3
Created: 27/Jun/12 2:04 PM
Description:

For JRUBY-6740, I had to disable caching of respond_to? results in RespondToCallSite, since the requirement to do respond_to_missing? calls on false results from the builtin respond_to? caused problems with user-defined respond_to? methods.

We should try to fix this and get it enabled again. Low priority, since it doesn't affect functionality, but it means respond_to? calls from Ruby code are slower now than 1.8 mode.

1.9 mode:

                                          user     system      total        real
control, 1 and :to_ary                0.060000   0.000000   0.060000 (  0.051000)
1m 1.respond_to?(:to_ary)             0.120000   0.000000   0.120000 (  0.116000)
1m 1.respond_to?(:to_ary,true)        0.110000   0.000000   0.110000 (  0.111000)
1m 1.respond_to?(:next)               0.080000   0.000000   0.080000 (  0.081000)
1m redefined obj.respond_to?          0.070000   0.010000   0.080000 (  0.064000)
1m varying name respond_to?           0.060000   0.000000   0.060000 (  0.066000)

1.8 mode:

                                         user     system      total        real
control, 1 and :to_ary               0.040000   0.000000   0.040000 (  0.039000)
1m 1.respond_to?(:to_ary)            0.040000   0.000000   0.040000 (  0.044000)
1m 1.respond_to?(:to_ary,true)       0.050000   0.000000   0.050000 (  0.045000)
1m 1.respond_to?(:next)              0.040000   0.000000   0.040000 (  0.044000)
1m redefined obj.respond_to?         0.050000   0.000000   0.050000 (  0.050000)
1m varying name respond_to?          0.060000   0.000000   0.060000 (  0.052000)

Note that invokedynamic logic does not do (has never done) any respond_to? magic right now, and performance is about the same as uncached non-indy logic.

Fix Versions: JRuby 1.7.0
Project: JRuby
Priority: Major Major
Reporter: Charles Oliver Nutter
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
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

Reply via email to