Project

General

Profile

Actions

Feature #10585

open

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

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

Status:
Open
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

Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0