[前][次][番号順一覧][スレッド一覧]

ruby-changes:30140

From: ko1 <ko1@a...>
Date: Fri, 26 Jul 2013 18:25:56 +0900 (JST)
Subject: [ruby-changes:30140] ko1:r42192 (trunk): * array.c (ary_memcpy): try to enable optimization.

ko1	2013-07-26 18:23:40 +0900 (Fri, 26 Jul 2013)

  New Revision: 42192

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=42192

  Log:
    * 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.

  Modified files:
    trunk/ChangeLog
    trunk/array.c

Index: array.c
===================================================================
--- array.c	(revision 42191)
+++ array.c	(revision 42192)
@@ -69,8 +69,7 @@ ary_memcpy(VALUE ary, long beg, long arg https://github.com/ruby/ruby/blob/trunk/array.c#L69
 {
 #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);
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 42191)
+++ ChangeLog	(revision 42192)
@@ -1,3 +1,9 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Fri Jul 26 18:21:58 2013  Koichi Sasada  <ko1@a...>
+
+	* 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@r...>
 
 	* win32/file.c (fix_string_encoding): fix target encoding.  the

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]