1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

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:
normal 2014-07-20 04:51:35 +00:00
parent eeb05e8c11
commit 0a2c4b4c2a
2 changed files with 7 additions and 3 deletions

View file

@ -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>
* include/ruby/io.h (rb_io_buffer_t): pack structure

View file

@ -110,21 +110,21 @@ typedef struct {
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;