BACK_TO_FEEDAICRIER_2
OpenUI parser rewrite hits 3x speed
OPEN_SOURCE ↗
HN · HACKER_NEWS// 22d agoBENCHMARK RESULT

OpenUI parser rewrite hits 3x speed

OpenUI rewrote its openui-lang parser from Rust/WASM to TypeScript and says the new path is up to 3.3x faster in streaming cases. The post argues the real bottlenecks were boundary crossings and repeated re-parsing, not Rust itself.

// ANALYSIS

That’s less a TypeScript victory lap than a reminder that the wrong abstraction boundary can erase a language’s advantage. For browser-side LLM parsing, simpler in-heap code plus better streaming logic beat a “faster” native runtime.

  • The first attempted fix, returning `JsValue` directly with `serde-wasm-bindgen`, was still slower than the JSON round-trip by 9-29%.
  • One-shot parsing improved from 20.5/61.4/57.9 µs in WASM to 9.3/13.4/19.4 µs in TypeScript, with the dashboard fixture landing at 3.0x faster.
  • The bigger streaming win came from caching completed statements, cutting the dashboard stream from 840 µs to 255 µs and the contact-form from 316 µs to 122 µs.
  • This is a strong fit for OpenUI’s generative UI parser, but it should not be read as a blanket “TypeScript beats Rust” verdict.
  • The takeaway for AI infra teams is practical: if your hot path is mostly serialization and runtime churn, profile the boundary before reaching for WebAssembly.
// TAGS
openuillmopen-sourcedevtoolbenchmark

DISCOVERED

22d ago

2026-03-21

PUBLISHED

22d ago

2026-03-20

RELEVANCE

8/ 10

AUTHOR

zahlekhan