Earlier quoted context omitted.
In my experience Rust typically makes it a little bit harder to write the most efficient algo actually.
Would you be willing to give an example of this?
We rewrote our Rust WASM parser in TypeScript and it got faster
141–150 of 239 posts
Re: We rewrote our Rust WASM parser in TypeScript and it got faster
#142Not directly related to the post but what does OpenUI do? I'm finding it interesting but hard to understand. Is it an intermediate layer that makes LLMs generate better UI?
Its the library that bridges the gap between LLMs and live UI. Best example would be to imagine you want to build interactive charts within your AI agent (like Claude) The most obvious approach would be to let LLMs generate code and render it but that introduces problems like safety, UI consistency and speed. OpenUI solves those problems and provides a safe, consistent and token optimized runtime for the LLMs to rend…
Re: We rewrote our Rust WASM parser in TypeScript and it got faster
#143Earlier quoted context omitted.
My experience is the exact opposite. This was particularly true for one of the projects I've worked with in the past, where Python was chosen as the main language for a monitoring service. In short, it proved itself to be a disaster: just the Python process collecting and parsing the metrics of all programs consumed 30-40% of the processing power of the lower end boxes. In the end, the project went ahead for a while…
> but in the end it was deemed a waste of time when the whole project was terminated. The main lesson of the story. Just pick Python and move fast, kids. It doesn’t matter how fast your software is if nobody uses it.
Re: We rewrote our Rust WASM parser in TypeScript and it got faster
#144Re: We rewrote our Rust WASM parser in TypeScript and it got faster
#145In their worst case it was just x5. We clearly have some progress here.
Re: We rewrote our Rust WASM parser in TypeScript and it got faster
#146Yeah if you're serializing and deserializing data across the JS-WASM boundary (or actually between web workers in general whether they're WASM or not) the data marshaling costs can add up. There is a way of sharing memory across the boundary though without any marshaling: TypedArrays and SharedArrayBuffers. TypedArrays let you transfer ownership of the underlying memory from one worker (or the main thread) to another…
Re: We rewrote our Rust WASM parser in TypeScript and it got faster
#147Re: We rewrote our Rust WASM parser in TypeScript and it got faster
#148Additionally even after those options are exhausted, only a key parts might need a rewrite, not the whole thing.
However, I wonder how many care about actually learning about algorithms, data structures and mechanical sympathy in the age of Electron apps.
It feels quite often that a rewrite is chosen, because knowing how to actually apply those skills is the CS stuff many think isn't worthwhile learning about.
Re: We rewrote our Rust WASM parser in TypeScript and it got faster
#149This is why, when a programming language already has tooling for compilers, being it ahead of time, or dynamic, it pays off to first go around validating algorithms and data structures before a full rewrite. Additionally even after those options are exhausted, only a key parts might need a rewrite, not the whole thing. However, I wonder how many care about actually learning about algorithms, data structures and mecha…
Never mind the age of Electron apps, even fewer care about those in the age of agents.
Re: We rewrote our Rust WASM parser in TypeScript and it got faster
#150The real win here isn't TS over Rust, it's the O(N²) -> O(N) streaming fix via statement-level caching. That's a 3.3x improvement on its own, independent of language choice. The WASM boundary elimination is 2-4x, but the algorithmic fix is what actually matters for user-perceived latency during streaming. Title undersells the more interesting engineering imo.
> The real win here isn't TS over Rust Kinda is. We came up with abstractions to help reason about what really matters. The more you need to deal with auxillary stuff (allocations, lifetimes), more likely you will miss the big issue.