aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-07-26 09:23:40 +0000
committerko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-07-26 09:23:40 +0000
commitd320b2d9e9d4d6dbb73c85df433f8b5559f7d716 (patch)
treeb413e5ea14986e52fe48dd760d1c5f5e3b867232
parent48443714b7c6521571e9a029d4221d8f75969b05 (diff)
downloadruby-d320b2d9e9d4d6dbb73c85df433f8b5559f7d716.tar.gz
* array.c (ary_memcpy): try to enable optimization.
At least on my environments, I don't see any errors with many trials. Please tell us if you find any GC bugs. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42192 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog6
-rw-r--r--array.c3
2 files changed, 7 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index f9dfdee2b1..e6076b3e61 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+Fri Jul 26 18:21:58 2013 Koichi Sasada <ko1@atdot.net>
+
+ * array.c (ary_memcpy): try to enable optimization.
+ At least on my environments, I don't see any errors
+ with many trials. Please tell us if you find any GC bugs.
+
Fri Jul 26 17:49:26 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
* win32/file.c (fix_string_encoding): fix target encoding. the
diff --git a/array.c b/array.c
index 9457851c10..8ab71289a2 100644
--- a/array.c
+++ b/array.c
@@ -69,8 +69,7 @@ ary_memcpy(VALUE ary, long beg, long argc, const VALUE *argv)
{
#if 1
if (OBJ_PROMOTED(ary)) {
- if (0 /* disalbe now, because it cause mysterious error. */
- && argc > 32 /* 32 is magic number */) {
+ if (argc > (128/sizeof(VALUE)) /* is magic number (cache line size) */) {
rb_gc_writebarrier_remember_promoted(ary);
RARRAY_PTR_USE(ary, ptr, {
MEMCPY(ptr+beg, argv, VALUE, argc);