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. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46885 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
eeb05e8c11
commit
0a2c4b4c2a
@ -1,3 +1,7 @@
|
|||||||
|
Sun Jul 20 13:50:34 2014 Eric Wong <e@80x24.org>
|
||||||
|
|
||||||
|
* transcode.c (rb_econv_t): reduce to 184 bytes from 200 on 64-bit
|
||||||
|
|
||||||
Sun Jul 20 12:44:23 2014 Eric Wong <e@80x24.org>
|
Sun Jul 20 12:44:23 2014 Eric Wong <e@80x24.org>
|
||||||
|
|
||||||
* include/ruby/io.h (rb_io_buffer_t): pack structure
|
* include/ruby/io.h (rb_io_buffer_t): pack structure
|
||||||
|
@ -110,21 +110,21 @@ typedef struct {
|
|||||||
|
|
||||||
struct rb_econv_t {
|
struct rb_econv_t {
|
||||||
int flags;
|
int flags;
|
||||||
|
int started; /* bool */
|
||||||
|
|
||||||
const char *source_encoding_name;
|
const char *source_encoding_name;
|
||||||
const char *destination_encoding_name;
|
const char *destination_encoding_name;
|
||||||
|
|
||||||
int started;
|
|
||||||
|
|
||||||
const unsigned char *replacement_str;
|
const unsigned char *replacement_str;
|
||||||
size_t replacement_len;
|
size_t replacement_len;
|
||||||
const char *replacement_enc;
|
const char *replacement_enc;
|
||||||
int replacement_allocated;
|
|
||||||
|
|
||||||
unsigned char *in_buf_start;
|
unsigned char *in_buf_start;
|
||||||
unsigned char *in_data_start;
|
unsigned char *in_data_start;
|
||||||
unsigned char *in_data_end;
|
unsigned char *in_data_end;
|
||||||
unsigned char *in_buf_end;
|
unsigned char *in_buf_end;
|
||||||
rb_econv_elem_t *elems;
|
rb_econv_elem_t *elems;
|
||||||
|
int replacement_allocated; /* bool */
|
||||||
int num_allocated;
|
int num_allocated;
|
||||||
int num_trans;
|
int num_trans;
|
||||||
int num_finished;
|
int num_finished;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user