Skip to content

Purge more quadratic-time regexes#581

Merged
ExplodingCabbage merged 1 commit intomasterfrom
fix-more-quadratic-regexes
Feb 17, 2025
Merged

Purge more quadratic-time regexes#581
ExplodingCabbage merged 1 commit intomasterfrom
fix-more-quadratic-regexes

Conversation

@ExplodingCabbage
Copy link
Collaborator

@ExplodingCabbage ExplodingCabbage commented Feb 14, 2025

Like #580.

To demonstrate the performance issue, run the following code either before or after applying this change (remember to build):

console.time(); diff.diffWords('a' + ' '.repeat(100000) + 'b', 'a' + ' '.repeat(100000) + 'c'); console.timeEnd()

On master (before merging this), this takes 17 seconds on my machine; on this branch, it takes a couple of milliseconds.

@ExplodingCabbage ExplodingCabbage self-assigned this Feb 14, 2025
@ExplodingCabbage ExplodingCabbage marked this pull request as ready for review February 17, 2025 12:10
@ExplodingCabbage ExplodingCabbage merged commit 81426fc into master Feb 17, 2025
@ExplodingCabbage ExplodingCabbage deleted the fix-more-quadratic-regexes branch February 17, 2025 12:12
ExplodingCabbage added a commit that referenced this pull request Feb 25, 2025
ExplodingCabbage added a commit that referenced this pull request Feb 25, 2025
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