Project

General

Profile

Actions

Bug #7111

closed

New build option to enable/disable global method caching

Added by shugo (Shugo Maeda) over 11 years ago. Updated over 11 years ago.

Status:
Closed
Target version:
-
ruby -v:
ruby 2.0.0dev (2012-10-05 trunk 37093) [i686-linux]
Backport:
[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.


Files

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

Updated by ko1 (Koichi Sasada) over 11 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

Updated by shugo (Shugo Maeda) over 11 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.

Updated by ko1 (Koichi Sasada) over 11 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

Actions #4

Updated by shugo (Shugo Maeda) over 11 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. [ruby-dev:46203] [Bug #7111]

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

Updated by shugo (Shugo Maeda) over 11 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.

Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0