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

ruby-changes:34802

From: normal <ko1@a...>
Date: Sun, 20 Jul 2014 13:51:51 +0900 (JST)
Subject: [ruby-changes:34802] normal:r46885 (trunk): rb_econv_t: reduce to 184 bytes from 200 on 64-bit

normal	2014-07-20 13:51:35 +0900 (Sun, 20 Jul 2014)

  New Revision: 46885

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

  Log:
    rb_econv_t: reduce to 184 bytes from 200 on 64-bit
    
    * transcode.c (rb_econv_t): reduce to 184 bytes from 200 on 64-bit
    
    This allows rb_econv_t to fit inside of three cache lines on x86-64.

  Modified files:
    trunk/ChangeLog
    trunk/transcode.c
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 46884)
+++ ChangeLog	(revision 46885)
@@ -1,3 +1,7 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+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
+
 Sun Jul 20 12:44:23 2014  Eric Wong  <e@8...>
 
 	* include/ruby/io.h (rb_io_buffer_t): pack structure
Index: transcode.c
===================================================================
--- transcode.c	(revision 46884)
+++ transcode.c	(revision 46885)
@@ -110,21 +110,21 @@ typedef struct { https://github.com/ruby/ruby/blob/trunk/transcode.c#L110
 
 struct rb_econv_t {
     int flags;
+    int started; /* bool */
+
     const char *source_encoding_name;
     const char *destination_encoding_name;
 
-    int started;
-
     const unsigned char *replacement_str;
     size_t replacement_len;
     const char *replacement_enc;
-    int replacement_allocated;
 
     unsigned char *in_buf_start;
     unsigned char *in_data_start;
     unsigned char *in_data_end;
     unsigned char *in_buf_end;
     rb_econv_elem_t *elems;
+    int replacement_allocated; /* bool */
     int num_allocated;
     int num_trans;
     int num_finished;

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

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