Bug #7111

New build option to enable/disable global method caching

Added by Shugo Maeda over 1 year ago. Updated over 1 year ago.

[ruby-dev:46203]
Status:Closed
Priority:Normal
Assignee:Koichi Sasada
Category:core
Target version:-
ruby -v:ruby 2.0.0dev (2012-10-05 trunk 37093) [i686-linux] Backport:

Description

Ruby has a build option to enable/disable inline method caching (OPTINLINEMETHODCACHE), but has no such option for global method caching.
How about to add a new build option OPT
GLOBALMETHODCACHE?

I've attached a patch to add that option.

opt_global_method_cache.diff Magnifier (2.22 KB) Shugo Maeda, 10/06/2012 03:31 PM

Associated revisions

Revision 37106
Added by Shugo Maeda over 1 year ago

  • vmopts.h (OPTGLOBALMETHODCACHE): new build option to
    enable/disable global method caching. [Bug #7111]

  • vmmethod.c (rbmethodentrygetwithomod): don't use global
    method cache if OPTGLOBALMETHOD_CACHE is 0.

History

#1 Updated by Koichi Sasada over 1 year ago

(2012/10/06 11:19), shugo (Shugo Maeda) wrote:

Ruby has a build option to enable/disable inline method caching (OPTINLINEMETHODCACHE), but has no such option for global method caching.
How about to add a new build option OPT
GLOBALMETHODCACHE?

I've attached a patch to add that option.

I don't have any objection.
Where is a patch?

--
// SASADA Koichi at atdot dot net

#2 Updated by Shugo Maeda over 1 year ago

ko1 (Koichi Sasada) wrote:

I don't have any objection.
Where is a patch?

I forgot to attach it:(
Please see optglobalmethod_cache.diff attached.

#3 Updated by Koichi Sasada over 1 year ago

(2012/10/06 15:31), shugo (Shugo Maeda) wrote:

I forgot to attach it:(
Please see optglobalmethod_cache.diff attached.

It is okay. But I recommend that only method search at the the
`rbmethodentrygetwith_omod' should be disable to measure and compare
performance.

--
// SASADA Koichi at atdot dot net

#4 Updated by Shugo Maeda over 1 year ago

  • Status changed from Open to Closed
  • % Done changed from 0 to 100

This issue was solved with changeset r37106.
Shugo, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.


  • vmopts.h (OPTGLOBALMETHODCACHE): new build option to
    enable/disable global method caching. [Bug #7111]

  • vmmethod.c (rbmethodentrygetwithomod): don't use global
    method cache if OPTGLOBALMETHOD_CACHE is 0.

#5 Updated by Shugo Maeda over 1 year ago

ko1 (Koichi Sasada) wrote:

(2012/10/06 15:31), shugo (Shugo Maeda) wrote:

I forgot to attach it:(
Please see optglobalmethod_cache.diff attached.

It is okay. But I recommend that only method search at the the
`rbmethodentrygetwith_omod' should be disable to measure and compare
performance.

I've committed the fix with the above change.

Also available in: Atom PDF