4 ms·
This is about the speed with which the compiler can advise an LLM that a particular thing checks or doesn't check. Typescript is much slower than Go
by habitue 1y ago
This is about the speed with which the compiler can advise an LLM that a particular thing checks or doesn't check. Typescript is much slower than Go
- tough 1y agookay so basically the faster compiling means a tigher feedback loop for the LLM to -know- if the code compiles or not etc? interesting is go faster than rust?
- yoyohello13 1y agoGo’s compiler is WAY faster than Rust’s. As far as speed of the actual program, Rust will generally be faster.
- notnullorvoid 1y agoGo or Rust compiler speeds won't have any effect here. The program in this context is the TypeScript compiler.
- koakuma-chan 1y agocargo check is WAY faster than go build
- Thaxll 1y agoWorking with both I can say that this is a big no, go mod is as fast if not faster, usually Go dep are much faster because Go does not import as much dependencies as Rust.
- koakuma-chan 1y agoIn Rust you only need to compile your dependencies once. After that it's just your app because dependencies don't change.
- binary132 1y agothat is also the case in Go…?
- koakuma-chan 1y agoSure, but the point is: don't be scared of dependencies in Rust.
- binary132 1y agoWell the context was a comparison of pros and cons and you started with “in Rust” so perhaps you can see why it sounded like you were presenting it as a pro.
- nulld3v 1y agoThis may be true, but in my experience Rust is still slower to compile because monomorphization must be done for deps every time you compile, even for deps that are already compiled. And monomorphization ends up taking a long time because it is done on every type/function that uses generics, and Rust code tends to use generics very liberally.
- notnullorvoid 1y ago> is go faster than rust? Depends on how you write the Go or Rust code. The most optimal Rust re-write of the TypeScript compiler would very likely be faster than the most optimal version in Go. However they didn't want to do a re-write, they wanted to port the existing compiler codebase written in TS. Go like TS (ultimately the JS runtime) also has GC which makes a 1-to-1 port much easier.
- PartiallyTyped 1y agoNo. Ignore the other comments. The reason for this decision is that they wanted a near 1:1 port of the typescript code to go, keeping design and structure almost identical. You can’t do that in rust as easily because of all the cyclical references and indirection involved. A rust port would be a rewrite. This is merely a migration.
- raincole 1y ago> is go faster than rust No. They rewrote in go because go is similar enough to typescript, while being faster than typescript. Source: https://github.com/microsoft/typescript-go/discussions/411 https://github.com/microsoft/typescript-go/discussions/411
- nikolayasdf123 1y ago[flagged]
- Philpax 1y agoWhat?
- int_19h 1y agoGo has a very simple type system that is easy to typecheck on every token. TypeScript has a type system that is complex enough, you can literally implement wasm inside it (and then use that to run e.g. Doom: https://socket.dev/blog/typescript-types-running-doom https://socket.dev/blog/typescript-types-running-doom)