Hacker News new | ask | show | jobs
by jchw 44 days ago
Go also just produces suboptimal code because it isn't maximally geared towards runtime performance. It lacks a lot of the more expensive optimization passes, like auto-vectorization.

On the other hand, time and time again it has been proven that it can be a good language to write tools that are perfectly sufficiently fast, like esbuild. With ts-go the choice to target Go instead of Rust seems to have come down to sensibilities and ease of translation, and possibly some other factors as well. I don't think they were aiming for maximum performance, and it would be unsurprising if you could squeeze quite a bit more out of ts-go itself with some effort.

The real benefit was getting the initial "10x" improvement, of course. Getting an additional 2x-3x is fantastic, but it's less noticeable when your codebase is already getting typechecked faster than you care to measure. For me even my largest codebases are chewed through plenty fast on ts-go, and I trust the TypeScript team to have done a good job (especially having seen some of their process for doing the port) so I think I'm good on missing out vibecoded Rust ports and whatnot. Interesting for sure, but we'll see how it all pans out in the long run.

1 comments

Yes, I agree. I am just trying to clear up some base-level confusion about how other versions can be faster. The person who vibecoded the Rust port already said they won't maintain it. For obvious reasons! Maintaining a codebase you haven't read becomes significantly more difficult. LLM ports are easy when you have years and years of good human-written tests providing a deterministic guideline that cages them in. Even then, the fabled Bun "Rust port in 11 days", besides costing millions in tokens, introduced hundreds of bugs not caught by the tests and took over three months of human labour before being shipped as an actual release, and is still experiencing instability. And once you lose sight of the codebase, continuing to improve the software becomes a nightmare - LLMs can't write good tests, and humans can't write good tests either if they don't understand the code, so the philosophy of "write tests as the specification for LLMs to implement" only carries you so far.
Source on Bun still being less stable than before the rewrite?