Live data from Hacker News

We rewrote our Rust WASM parser in TypeScript and it got faster

openui.com

231–239 of 239 posts

Re: We rewrote our Rust WASM parser in TypeScript and it got faster

#231

Earlier quoted context omitted.

[dead]

This comment comes from a bot account. One of the more clever ones I’ve seen that avoids some of the usual tells, but the comment history taken together exposes it. I hit the flag button on the comment and suggest others do too.

Huh? How am I a bot account?

Re: We rewrote our Rust WASM parser in TypeScript and it got faster

#232

Earlier quoted context omitted.

[dead]

Thanks, Programming History Facts Bot I was not actually sure this one was a bot, despite LLM-isms and, sadly, being new. But you can look at the comment history and see.

Definitely not a bot, I am however super interested in programming history!

Re: We rewrote our Rust WASM parser in TypeScript and it got faster

#233
post #70
post #64

Earlier quoted context omitted.

I don't think the better software part is playing out

you're thinking of the programs in low-level langs that survived their higher-level-lang competitors; if you plot the programs on your machine by age, how does the low quartile compare on reliability between programs written in each group

Survivorship bias is exactly right.

The C and assembly programs we still use are the ones that were good enough to last. The thousands that weren't are gone.

Nobody counts the programs that were never finished because the language made them too hard to write in the first place.

Re: We rewrote our Rust WASM parser in TypeScript and it got faster

#234

Earlier quoted context omitted.

Hmm, there's an in-progress rewrite of the TypeScript compiler in Go; is that what you mean? I don't think that's actually out yet, and more importantly, it doesn't change anything at runtime -- your code still runs in a JS engine (V8, JSC etc).

npm i -D @typescript/native-preview You can use it today.

You get a gold star.

Re: We rewrote our Rust WASM parser in TypeScript and it got faster

#235

Am I mistaken or isn’t TypeScript just Golang under the hood these days?

Yes, you've uncovered grand conspiracy.

It’s funny because a decade ago people said I was crazy for thinking that Oracle owning JS was going to become an issue in the future.

Re: We rewrote our Rust WASM parser in TypeScript and it got faster

#236
post #103
post #100

Earlier quoted context omitted.

Ome advantage of python is that it is so slow that if you choose the wrong algorithm or data structure that soon gets obvious. And for complicated stuff this is exactly where I find the LLMs struggle. So I make a first version in Python, and only when I am happy with the results and the speed feels reasonable compared to the problem complexity, I ask Claude Code to port the critical parts to Rust.

The last part is really interesting. It feels like the whole world will soon become Python/JS because thats what LLMs are good at. Very few people will then take the pain of optimizing it

Nope. The world runs on code written in C and C++. Including Python itself. There is a reason why there are literally millions of C/C++ programmers out there working on C/C++ code every day.

Re: We rewrote our Rust WASM parser in TypeScript and it got faster

#237
post #208

Something not unlike this happened to me when moving some batch processing code from C++ to Python 1.4 (this was 1997). The batch started finishing about 10x faster. We refused to believe it at first and started looking to make sure the work was actually being done. It was. The port had been done in a weekend just to see if we could use Python in production. The C++ code had taken a few months to write. The port was…

This is the difference between scripting and programming. If you use C++ as a scripting language you're gonna have a bad time.Of course a scripting language is faster for scripting! That doesn't mean you go full Graham and throw away real programming languages, it just means you aren't writing systems software. The usual strategy is to write a script then if it's slow see how you could design a program that would The…

I use C++ instead of so called 'scripting' languages all the time. I have zero problems doing that and it is lightning fast.

Re: We rewrote our Rust WASM parser in TypeScript and it got faster

#238
Had the opposite experience. Our JS FEM solver (~550ms per load case) was rewritten in Rust and dropped to ~270ms. But we compile to native.exe, not WASM — we call it via stdin/stdout with JSON from a Node.js compute engine. Tried the WASM route first but the serialization overhead for large stiffness matrices ate the gains, exactly like this article describes. Native binary + stdin/stdout turned out to be the sweet spot: no boundary tax, no FFI, and you get full native SIMD. The sparse solver variant (sprs crate, COO/CSC assembly) scales even better for larger models.

Re: We rewrote our Rust WASM parser in TypeScript and it got faster

#239

Earlier quoted context omitted.

I think a lot of people (especially those who are only peripherally involved in development, like management) don't really consider performance regressions at all when thinking about how to get software to go faster. Meanwhile my experience has been that whenever there has been a performance issue severe enough to actually matter, it's often been the result of some kind of performance bug, not so much language, runti…

My experience has been that performance bugs show up in lots of places and I'm very lucky when it's just a bug. The far more painful performance issues are language and runtime limitations. But, of course, profiling is always step one.

[deleted]
Post reply on HN