Skip to content

Eliminate extra ptr object from JRuby extension #183

@headius

Description

@headius

The JRuby implementation of StringIO allocates a separate StringIOData "ptr" object to hold the actual contents of the StringIO. This was only done because the C version does something similar, due to the inability of CRuby to store this state in the actual heap object. Since JRuby has no such limitation (the JVM supports variable-width objects), this extra object just adds overhead to the JRuby StringIO extension.

Eliminate the extra object and reference and move those fields into the StringIO object.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions