Skip to content

feat: optimize Suffix Tree performance to O(N)#10

Merged
abahgat merged 1 commit intomasterfrom
performance-optimization
Feb 16, 2026
Merged

feat: optimize Suffix Tree performance to O(N)#10
abahgat merged 1 commit intomasterfrom
performance-optimization

Conversation

@abahgat
Copy link
Copy Markdown
Owner

@abahgat abahgat commented Feb 16, 2026

  • Refactored Edge to use substring views instead of String copies.
  • Optimized GeneralizedSuffixTree to use index arithmetic in canonize.
  • Implemented geometric expansion for Node data array resizing to fix O(N^2) bottleneck in degenerate cases.
  • Updated benchmarks to include degenerate test cases.

- Refactored Edge to use substring views instead of String copies.
- Optimized GeneralizedSuffixTree to use index arithmetic in canonize.
- Implemented geometric expansion for Node data array resizing to fix O(N^2) bottleneck in degenerate cases.
- Updated benchmarks to include degenerate test cases.
@abahgat abahgat merged commit d3e0e48 into master Feb 16, 2026
2 checks passed
@abahgat abahgat deleted the performance-optimization branch February 16, 2026 19:53
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