Repository navigation
Conversation
The tokenizer was a state machine that handled one character at a time, which is a lot of interpreted steps for the typical markers. Instead: * Find the strings with `str.find`. * Split what is between them on whitespace. * Only use the state machine for the words that have variables and operators without whitespace between them, e.g. `os_name=="posix"`. This is 5 times fewer steps for the tokenization and about 2 times fewer steps for the evaluation of the markers.
Owner
Author
|
This PR was prepared by an AI agent (Claude Code) working for the author. The author reads the review comments and decides how they are handled; any reply posted by the agent will say so. This comment was automatically generated by an AI agent and was not reviewed by the author. |
3 tasks
Owner
Author
|
Superseded by the stack that was rebuilt on the latest main and sent upstream: bazel-contrib#4543 to bazel-contrib#4550. This comment was automatically generated by an AI agent and was not reviewed by the author. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The tokenizer was a state machine that handled one character at a time,
which is a lot of interpreted steps for the typical markers. Instead:
str.find.operators without whitespace between them, e.g.
os_name=="posix".This is 5 times fewer steps for the tokenization and about 2 times fewer
steps for the evaluation of the markers.
Work towards #19