Conversation
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.
改动
有限状态机是一种用状态和状态转换表示允许路径的数据结构。编译器会为每个状态计算一个数字摘要,用于识别可复用的等价后续路径。本改动用按状态编号索引的连续数组替代树形映射,并用连续数组充当遍历队列,减少为每个状态反复分配映射节点和队列节点的开销。
本请求依赖 #722 的单状态摘要基础,以及 #781 的整条有限状态机摘要数组。当前分支包含这些前置提交;本请求需要审查的独立提交是
5a85941a。性能
结构标签是把触发文本、函数参数规则和结束文本组合起来的生成约束。JSON Schema 是描述 JSON 数据结构及字段约束的规则。允许词元集合生成时间是生成每一步筛选合法词元所需的平均时间。
四类输入的编译时间均下降;允许词元集合生成时间有 1.5% 至 7.2% 的回退,改动本身不在生成阶段运行。
正确性