[PR #507] [MERGED] perf(utf8): optimize wrap breaks #587

Closed
opened 2026-03-02 23:47:14 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/anomalyco/opentui/pull/507
Author: @simonklee
Created: 1/9/2026
Status: Merged
Merged: 1/11/2026
Merged by: @kommander

Base: mainHead: perf-utf8-simd-parallel


📝 Commits (2)

  • a002273 perf(utf8): optimize wrap breaks
  • 8494af8 Merge branch 'main' into perf-utf8-simd-parallel

📊 Changes

1 file changed (+17 additions, -17 deletions)

View changed files

📝 packages/core/src/zig/utf8.zig (+17 -17)

📄 Description

Refactored findWrapBreaks to remove data dependencies. The old implementation chained @select calls serially. The new one uses bitwise ORs on boolean vectors, allowing the CPU to check all character classes (whitespace, punctuation, brackets) in parallel instructions.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/anomalyco/opentui/pull/507 **Author:** [@simonklee](https://github.com/simonklee) **Created:** 1/9/2026 **Status:** ✅ Merged **Merged:** 1/11/2026 **Merged by:** [@kommander](https://github.com/kommander) **Base:** `main` ← **Head:** `perf-utf8-simd-parallel` --- ### 📝 Commits (2) - [`a002273`](https://github.com/anomalyco/opentui/commit/a002273d09bb3ca1af318065a98373d438281c24) perf(utf8): optimize wrap breaks - [`8494af8`](https://github.com/anomalyco/opentui/commit/8494af8ab2e83028ce59e4089c5ecafc5d46f3fb) Merge branch 'main' into perf-utf8-simd-parallel ### 📊 Changes **1 file changed** (+17 additions, -17 deletions) <details> <summary>View changed files</summary> 📝 `packages/core/src/zig/utf8.zig` (+17 -17) </details> ### 📄 Description Refactored `findWrapBreaks` to remove data dependencies. The old implementation chained `@select` calls serially. The new one uses bitwise ORs on boolean vectors, allowing the CPU to check all character classes (whitespace, punctuation, brackets) in parallel instructions. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-02 23:47:14 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/opentui#587
No description provided.