Skip to content

Fallback Implementation is very slow #64

@Dr-Emann

Description

@Dr-Emann

The fallback implementation (especially for the Const versions which use a function pointer which is called per input byte, and so can't be optimized much by the compiler)

It appears possible for the compiler to optimize a struct with the bytes to search for equally well as a function, so it seems like the fallback could be implemented like that instead.

For backwards compat, we could keep the F generic parameter, or we could make a breaking change and remove it.

Goes best with #63, for the ability to build a const instance, and let the compiler see through it (which it can't do through a lazy_static/once_lock).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions