Project

General

Profile

Actions

Feature #11371

closed

[PATCH] parse.y (struct parser_params): pack to 4 cache lines on x86-64

Added by normalperson (Eric Wong) over 8 years ago. Updated over 8 years ago.

Status:
Closed
Assignee:
-
Target version:
-
[ruby-core:70024]

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) over 8 years ago

Why remove this line?

-    parser->parser_in_defined = 0;

Updated by normalperson (Eric Wong) over 8 years ago

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) over 8 years ago

I think it's OK if intended, and you may want to remove all 0-assignment lines before this commit.

Actions #4

Updated by Anonymous over 8 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).

Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0