Skip to content

skip_whitespace is inefficient for non-whitespace tokens #209

@jdm

Description

@jdm

Depending on how often we call skip_whitespace when non-whitespace tokens are expected (which is actually quite common, IIRC) we can probably make it more efficient by adding a case to the top of the match at https://github.com/servo/rust-cssparser/blob/master/src/tokenizer.rs#L459 that catches any byte after / and immediately returns.

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