Project

General

Profile

Feature #10585

struct: speedup struct.attr = v for first 10 attributes and struct[:attr] for big structs

Added by funny_falcon (Yura Sokolov) over 5 years ago. Updated almost 5 years ago.

Status:
Open
Priority:
Normal
Assignee:
-
Target version:
-
[ruby-core:66767]

Description

0001 - Define optimized setters for first 10 attributes.

0002 - Cache members definition in an subclasses - it is safe cause it could be modified/overloaded.
And use rb_attr_get to lookup definition - it is safe cause result is checked later and Qnil is treated as error.

0003,0004 - Use custom hash structure (on top of Array) to lookup members index in a big structure.
Well, I doubt that big structures are useful, so I will not grieve if 0004 is not accepted.


Files

Also available in: Atom PDF