Feature #11371
closed[PATCH] parse.y (struct parser_params): pack to 4 cache lines on x86-64
Description
parse.y (struct parser_params): pack to four cache lines on x86-64
This reduces the struct from 256 (from 288) bytes on my x86-64
system, allowing the struct to fit cleanly into 4 cache lines
if a malloc implementation allows it.
Pretty minor, but it might make future improvements easier-to-spot.
Will commit in a few days/weeks
Files
Updated by nobu (Nobuyoshi Nakada) almost 9 years ago
Why remove this line?
- parser->parser_in_defined = 0;
Updated by normalperson (Eric Wong) almost 9 years ago
nobu@ruby-lang.org wrote:
Why remove this line?
- parser->parser_in_defined = 0;
Oops, I was going to MEMZERO-ing the whole struct (or rely on
TypedData_Make_Struct) but got distracted. I'll keep that line
if I commit this patch.
Updated by nobu (Nobuyoshi Nakada) almost 9 years ago
I think it's OK if intended, and you may want to remove all 0-assignment lines before this commit.
Updated by Anonymous almost 9 years ago
- Status changed from Open to Closed
Applied in changeset r51302.
parse.y (struct parser_params): pack to 4 cache lines on x86-64
This reduces the struct from 256 (from 288) bytes on my x86-64
system, allowing the struct to fit cleanly into 4 cache lines
(if a malloc implementation allows it).
- parse.y (struct parser_params): pack: 88 => 256 bytes on 64-bit
[ruby-core:70034] [Feature #11371]