Project

General

Profile

Bug #7111

New build option to enable/disable global method caching

Added by Shugo Maeda over 3 years ago. Updated over 3 years ago.

Status:
Closed
Priority:
Normal
Assignee:
ruby -v:
ruby 2.0.0dev (2012-10-05 trunk 37093) [i686-linux]
[ruby-dev:46203]

Description

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

I've attached a patch to add that option.

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

Associated revisions

Revision 37106
Added by Shugo Maeda over 3 years ago

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

  • vm_method.c (rb_method_entry_get_with_omod): don't use global
    method cache if OPT_GLOBAL_METHOD_CACHE is 0.

Revision 37106
Added by Shugo Maeda over 3 years ago

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

  • vm_method.c (rb_method_entry_get_with_omod): don't use global
    method cache if OPT_GLOBAL_METHOD_CACHE is 0.

Revision 37106
Added by Shugo Maeda over 3 years ago

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

  • vm_method.c (rb_method_entry_get_with_omod): don't use global
    method cache if OPT_GLOBAL_METHOD_CACHE is 0.

History

#1 [ruby-dev:46204] Updated by Koichi Sasada over 3 years ago

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

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

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 [ruby-dev:46205] Updated by Shugo Maeda over 3 years ago

ko1 (Koichi Sasada) wrote:

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

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

#3 [ruby-dev:46206] Updated by Koichi Sasada over 3 years ago

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

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

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

--
// SASADA Koichi at atdot dot net

#4 Updated by Shugo Maeda over 3 years 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.


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

  • vm_method.c (rb_method_entry_get_with_omod): don't use global
    method cache if OPT_GLOBAL_METHOD_CACHE is 0.

#5 [ruby-dev:46207] Updated by Shugo Maeda over 3 years ago

ko1 (Koichi Sasada) wrote:

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

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

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

I've committed the fix with the above change.

Also available in: Atom PDF