Skip to content

Use a &str for the input instead of a Vec<Char> in the tokenizer#89

Merged
valenting merged 1 commit intodenoland:mainfrom
jrmuizel:main
Jan 23, 2026
Merged

Use a &str for the input instead of a Vec<Char> in the tokenizer#89
valenting merged 1 commit intodenoland:mainfrom
jrmuizel:main

Conversation

@jrmuizel
Copy link
Contributor

@jrmuizel jrmuizel commented Jan 21, 2026

This avoids allocating the Vec and expanding the &str into it. It also makes possible for the Token to use a &str instead of a String.

This improves pattern parsing performance by about 3%

This avoids allocating the Vec and expanding the &str into it.
It also makes possible for the Token to use a &str instead of a
String.

This improves pattern parsing performance by about 3%
@valenting valenting merged commit 1158866 into denoland:main Jan 23, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants