[PR #472] [MERGED] bench(text-buffer-view): add measureForDimensions benchmark #1340

Closed
opened 2026-03-14 09:31:26 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/anomalyco/opentui/pull/472
Author: @simonklee
Created: 1/4/2026
Status: Merged
Merged: 1/5/2026
Merged by: @kommander

Base: mainHead: measure-dimensions-bench


📝 Commits (1)

  • 16dfa50 bench(text-buffer-view): add measureForDimensions benchmark

📊 Changes

1 file changed (+109 additions, -6 deletions)

View changed files

📝 packages/core/src/zig/bench/text-buffer-view_bench.zig (+109 -6)

📄 Description

Add a benchmark for measureForDimensions().

This function creates a fresh arena and performs a full rope walk on every call.

The benchmark has two scenarios:

  • static: repeated calls on unchanged content (measures cache-miss penalty)
  • streaming: calls interleaved with token appends (simulates LLM output)

This adds a baseline for measuring future fixes like result caching, arena reuse.

Refs: anomalyco/opencode#6172


🔄 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/472 **Author:** [@simonklee](https://github.com/simonklee) **Created:** 1/4/2026 **Status:** ✅ Merged **Merged:** 1/5/2026 **Merged by:** [@kommander](https://github.com/kommander) **Base:** `main` ← **Head:** `measure-dimensions-bench` --- ### 📝 Commits (1) - [`16dfa50`](https://github.com/anomalyco/opentui/commit/16dfa506571e17b7b0dc9c7977a572a0729feda7) bench(text-buffer-view): add measureForDimensions benchmark ### 📊 Changes **1 file changed** (+109 additions, -6 deletions) <details> <summary>View changed files</summary> 📝 `packages/core/src/zig/bench/text-buffer-view_bench.zig` (+109 -6) </details> ### 📄 Description Add a benchmark for measureForDimensions(). This function creates a fresh arena and performs a full rope walk on every call. The benchmark has two scenarios: - static: repeated calls on unchanged content (measures cache-miss penalty) - streaming: calls interleaved with token appends (simulates LLM output) This adds a baseline for measuring future fixes like result caching, arena reuse. Refs: anomalyco/opencode#6172 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-14 09:31:26 +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#1340
No description provided.