Skip to content

Cache object ID and hash in low-count immediate values #9096

@headius

Description

@headius

Immediate values like nil, false, true, and perhaps symbols are either singletons or only created in small numbers, but may be used as hash keys or in object ID comparisons. We should cache their object IDs and hash values permanently rather than construct a RubyFixnum every time.

Relates to #9088.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions