fix(p4): adopt unlaxer 3.0.11 — #5 nested-if now <2s (#49) - #50
Merged
Conversation
… <2s strict (#49) unlaxer-parser 3.0.11 makes the P4 mapper memoize mapToken by token identity and drop the per-token reflection that, multiplied by ~10M redundant subtree re-mappings, made the deeply nested fraud formula #5 take 12-30s even with packrat parse memoization. End-to-end #5 now parses in ~30ms. - bump unlaxer-common + unlaxer-dsl 3.0.10 -> 3.0.11 - P4PackratFraudFormulaTest: hold #5 to the same strict sub-second bound as the other formulas (drop the nested-if residual special-case) and refresh the doc comment to the real root cause (mapping-phase re-mapping, not StringSource.peek). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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 freeto 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.
#49 end-to-end 反映
unlaxer-parser 3.0.11(PR opaopa6969/unlaxer-parser#52)が P4 mapper を修正:
mapTokenのトークン単位メモ化(~1000万回の冗長な部分木再マッピングを1トークン1回に)token*Compatのリフレクション撤廃これにより #19 例5(深いネスト if)が memoize ON で 12–30s → ~30ms。
変更
unlaxer-common/unlaxer-dsl3.0.10 → 3.0.11P4PackratFraudFormulaTest: P4 LSP: go-to-definition / find-references (ScopeStore 活用) #5 を他式と同じ strict sub-second 境界(<2s)に戻し、nested-if 残留の特例を削除。doc コメントを真因(mapping 段の再マッピング、StringSource.peekではない)に更新。検証
全 fraud 式 <0.5s(#5=38ms)。
P4PackratFraudFormulaTest緑。🤖 Generated with Claude Code