Skip to content

perf(inline): unclosed [ and emphasis openers parse in linear time - #5

Closed
SMOSTAFAH1 wants to merge 3 commits into
mainfrom
develop
Closed

SMOSTAFAH1 wants to merge 3 commits into
mainfrom
develop

Conversation

@SMOSTAFAH1

Copy link
Copy Markdown
Member

findClosingBracket memoizes the first tail with no ] at all so [×N is O(n) instead of O(n²). matchStackedEmphasis memoizes when a full scan sees no canClose candidate, so "*a "×N stays linear after the first failed opener.

Refs: #4

findClosingBracket memoizes the first tail with no ] at all so [×N is O(n) instead of O(n²). matchStackedEmphasis memoizes when a full scan sees no canClose candidate, so "*a "×N stays linear after the first failed opener.

Refs: #4
@SMOSTAFAH1 SMOSTAFAH1 self-assigned this Nov 10, 2026
@sonarqubecloud

Copy link
Copy Markdown

@SMOSTAFAH1 SMOSTAFAH1 closed this Nov 10, 2026
@SMOSTAFAH1
SMOSTAFAH1 deleted the develop branch November 10, 2026 13:46
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.

1 participant