Skip to content

perf: back more extracted String instances by the original input #51

Open
@jbee

Description

@jbee

String#substring creates a "view" onto the original string backed by the same byte[]. It would be nice if more of the extracted strings could just be views backed by the original full input.

The difficulty is that String internally uses byte[] not char[] (any longer). Also it is not possible to wrap an existing char[] or byte[] into a String instance without copying it entirely or a section of it. This means most likely sharing can only be done by changing from String to CharSequence in the places that expose shared content.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestperformancePerformance related or motivated changes

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions