Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Split std.mem.split and tokenize into sequence, any, and scalar versions #15579

Merged
merged 6 commits into from
Jun 3, 2023

Commits on May 13, 2023

  1. std.mem: Split split and splitBackwards into 3 versions by delimi…

    …ter type: full, any, and scalar
    
    This allows users to choose which version they need for their particular use case, as the previous default (now the 'full' version) was (1) not always the desired type of delimiter and (2) performed worse than the scalar version if the delimiter was a single item.
    squeek502 committed May 13, 2023
    Configuration menu
    Copy the full SHA
    bda645d View commit details
    Browse the repository at this point in the history
  2. std.mem: Split tokenize into 3 versions by delimiter type: full, an…

    …y, and scalar
    
    This allows users to choose which version they need for their particular use case, as the previous default (now the 'any' version) was (1) not always the desired type of delimiter and (2) performed worse than the scalar version if the delimiter was a single item.
    squeek502 committed May 13, 2023
    Configuration menu
    Copy the full SHA
    9da3a97 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    ce9f3ec View commit details
    Browse the repository at this point in the history
  4. Update all std.mem.tokenize calls to their appropriate function

    Everywhere that can now use `tokenizeScalar` should get a nice little performance boost.
    squeek502 committed May 13, 2023
    Configuration menu
    Copy the full SHA
    815e53b View commit details
    Browse the repository at this point in the history
  5. Update all std.mem.split calls to their appropriate function

    Everywhere that can now use `splitScalar` should get a nice little performance boost.
    squeek502 committed May 13, 2023
    Configuration menu
    Copy the full SHA
    2129f28 View commit details
    Browse the repository at this point in the history
  6. std.mem: Rename splitFull/tokenizeFull to splitSequence/tokenizeSequence

    I think this makes the name less ambiguous and more obvious that the suffix applies to the `delimiter`.
    squeek502 committed May 13, 2023
    Configuration menu
    Copy the full SHA
    104f405 View commit details
    Browse the repository at this point in the history