Skip to content

Search of a singleton needle should use memchr #696

@Bodigrim

Description

@Bodigrim

Surprisingly, both Data.Text.Internal.Search and Data.Text.Lazy.Search have special cases for searching a single ASCII character, but neither uses memchr, even while the main codepath does, so it is readily accessible.

(See https://discourse.haskell.org/t/blog-5x-speedup-changing-break-to-elemindex/13946 for context)

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