-
-
Notifications
You must be signed in to change notification settings - Fork 25
Open
Description
Currently, Literal generates and evaluates code each time you define a property, which means it is O(n²).
This is not a big problem because it’s rare for an object to have more than a handful of properties. And Ruby is pretty fast. However, it would be much more efficient if we could do this only once after all properties have been specified.
Two options come to mind:
- Use the
:end
TracePoint and a patch toClass.new
- Use a pre-processor like
strict_ivars
Metadata
Metadata
Assignees
Labels
No labels