3 ms·
The Go compiler is also pretty fast.
by Rochus 1y ago
The Go compiler is also pretty fast.
- klysm 1y agoMaybe typescript will catch up
- satvikpendem 1y agoIt's being rewritten in Go so yes it will
- serial_dev 1y agoThe compiler might be rewritten in Go, but the Typescript and Go languages themselves are very different. Go’s main objectives were fast builds and a simple language. Typescript is tacked onto another language that doesn’t really care about TS with three decades of warts, cruft and hacks thrown together.
- veber-alex 1y agoIt's hard to say. One the one hand the go type system is a joke compared to typescript so the typescript compiler has a much harder job of type checking. On the other hand once type checking is done typescript just needs to strip the types and it's done while go needs to optimize and generate assembly.
- levodelellis 1y agoI'd call it not terribly slow. IIRC it didn't hit 100k lines on an M2, while I saw over two million on my own compiler (I used multiple instances of tcc since I didn't want to deal with implementing debug info on mac)
- c0balt 1y agoWhat specifically are those 100k lines though? Golang code that, e. G., uses generics is significantly heavier than code that doesn't.
- levodelellis 1y agoI don't remember, I grabbed a project that I can't remember the name of and compiled something else first to warm up the compiler then compile the project. I tried several times and it seemed to be consistently < 100K