Skip to content

String.quote builds a temporary string for each printable ASCII character #2312

Backlog

Description

@oxura

What you did

Ran String.quote 192 times on a 122,880-character printable ASCII string, consuming the result each time. Native Linux build with clang -O3, one process at a time.

What happened

Median 0.43 s across five runs. The ordinary characters make a one-character string via Char.quote and then consume that string to put the same character onto the reversed result. Escapes need that path; an ordinary ASCII character doesn't.

bend --version

2.0.40, main at 966bbb74.

uname -sm

Linux x86_64.

clang --version (the first line)

clang version 22.1.8.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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