1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* gc.c: change deafult value of

RUBY_GC_HEAP_FREE_SLOTS_MIN_RATIO 0.3 -> 0.2
  RUBY_GC_HEAP_FREE_SLOTS_MAX_RATIO 0.8 -> 0.65

  These values are same as Ruby 2.0.0.

  This change cause GC counts.
  However, generational GC reduced each (minor) GC time and
  increase memory locality. So that not so big impact on my
  benchmarking results.
  (surprizingly, this fix speed up programs on some cases)

  You can change these values by environment variables
  if you feel wrong.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54482 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
ko1 2016-04-04 08:49:17 +00:00
parent 3287bad257
commit 02f7507453
2 changed files with 19 additions and 2 deletions

View file

@ -1,3 +1,20 @@
Mon Apr 4 17:43:45 2016 Koichi Sasada <ko1@atdot.net>
* gc.c: change deafult value of
RUBY_GC_HEAP_FREE_SLOTS_MIN_RATIO 0.3 -> 0.2
RUBY_GC_HEAP_FREE_SLOTS_MAX_RATIO 0.8 -> 0.65
These values are same as Ruby 2.0.0.
This change cause GC counts.
However, generational GC reduced each (minor) GC time and
increase memory locality. So that not so big impact on my
benchmarking results.
(surprizingly, this fix speed up programs on some cases)
You can change these values by environment variables
if you feel wrong.
Mon Apr 4 17:36:52 2016 Koichi Sasada <ko1@atdot.net>
* gc.c (get_envparam_double): take an upper_bound.

4
gc.c
View file

@ -118,13 +118,13 @@ rb_gc_guarded_ptr_val(volatile VALUE *ptr, VALUE val)
#endif
#ifndef GC_HEAP_FREE_SLOTS_MIN_RATIO
#define GC_HEAP_FREE_SLOTS_MIN_RATIO 0.30
#define GC_HEAP_FREE_SLOTS_MIN_RATIO 0.20
#endif
#ifndef GC_HEAP_FREE_SLOTS_GOAL_RATIO
#define GC_HEAP_FREE_SLOTS_GOAL_RATIO 0.40
#endif
#ifndef GC_HEAP_FREE_SLOTS_MAX_RATIO
#define GC_HEAP_FREE_SLOTS_MAX_RATIO 0.80
#define GC_HEAP_FREE_SLOTS_MAX_RATIO 0.65
#endif
#ifndef GC_MALLOC_LIMIT_MIN