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

ruby-changes:34803

From: normal <ko1@a...>
Date: Sun, 20 Jul 2014 14:34:48 +0900 (JST)
Subject: [ruby-changes:34803] normal:r46886 (trunk): rb_proc_t: reduce to 64 bytes from 72 on 64-bit

normal	2014-07-20 14:34:32 +0900 (Sun, 20 Jul 2014)

  New Revision: 46886

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

  Log:
    rb_proc_t: reduce to 64 bytes from 72 on 64-bit
    
    * vm_core.h (rb_proc_t): reduce to 64 bytes from 72 on 64-bit
    
    This allows rb_proc_t to fit inside a single cache line on x86-64

  Modified files:
    trunk/ChangeLog
    trunk/vm_core.h
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 46885)
+++ ChangeLog	(revision 46886)
@@ -1,3 +1,7 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Sun Jul 20 14:26:27 2014  Eric Wong  <e@8...>
+
+	* vm_core.h (rb_proc_t): reduce to 64 bytes from 72 on 64-bit
+
 Sun Jul 20 13:50:34 2014  Eric Wong  <e@8...>
 
 	* transcode.c (rb_econv_t): reduce to 184 bytes from 200 on 64-bit
Index: vm_core.h
===================================================================
--- vm_core.h	(revision 46885)
+++ vm_core.h	(revision 46886)
@@ -738,9 +738,9 @@ typedef struct { https://github.com/ruby/ruby/blob/trunk/vm_core.h#L738
 
     VALUE envval;		/* for GC mark */
     VALUE blockprocval;
-    int safe_level;
-    int is_from_method;
-    int is_lambda;
+    int8_t safe_level;		/* 0..4 */
+    int8_t is_from_method;	/* bool */
+    int8_t is_lambda;		/* bool */
 } rb_proc_t;
 
 #define GetEnvPtr(obj, ptr) \

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

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