Skip to content

Use memrchr or similar in LineWriter::write #30076

Closed
@bluss

Description

@bluss

The LineWriter (used by stdout) searches for a newline in each .write() call. As compiled today, this byte search compiles to a byte-by-byte loop. This is a very hot loop, and unnecessarily so if you output data that's not line delimited. Using memchr or equivalent would improve this.

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