From 02f7507453f8b7d5e053620d06609ce4bc089a53 Mon Sep 17 00:00:00 2001 From: ko1 Date: Mon, 4 Apr 2016 08:49:17 +0000 Subject: * 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 --- ChangeLog | 17 +++++++++++++++++ gc.c | 4 ++-- 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 8120a3d9ba..a3927b1669 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,20 @@ +Mon Apr 4 17:43:45 2016 Koichi Sasada + + * 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 * gc.c (get_envparam_double): take an upper_bound. diff --git a/gc.c b/gc.c index 66bacbcb5f..2baf7a8665 100644 --- a/gc.c +++ b/gc.c @@ -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 -- cgit v1.2.3