5 ms·
Pet peeve of mine: "X compiler/interpreter/JIT written in X". Case in point five years and 150k+ lines with the slow Scala compiler written in Scala (it's conc
by KingOfCoders 5y ago
Pet peeve of mine: "X compiler/interpreter/JIT written in X".
Case in point five years and 150k+ lines with the slow Scala compiler written in Scala (it's conceptual slow because of the language (types, implicits, ...) and it's accidentally slow because written in Scala (a slow language) on the JVM (slow startups and warmups)). I do get the coolness, the eat your own dog food, the I-write-X-in-X-because-I-obviously-like-X-otherwise-I-would-not-create-it-duh, but as a user I hate it.
I would prefer "X written in A" where A is the reasonably fastest language, e.g. Rust.
I love the Go compiler for speed.
- kibibu 5y ago> I love the Go compiler for speed Wait till you find out what the Go compiler is written in then.
- KingOfCoders 5y agoIn one of the fastest languages, X==A :-)
- fredrikholm 5y agoGo! https://golang.org/doc/go1.5#c https://golang.org/doc/go1.5#c
- habibur 5y agoOnly for the build time to take a nosedive when they ditched C. Explained here, by a factor of 2. https://golang.org/doc/go1.5#performance https://golang.org/doc/go1.5#performance
- pjmlp 5y agoTrue, and as they explain, > Builds in Go 1.5 will be slower by a factor of about two. The automatic translation of the compiler and linker from C to Go resulted in unidiomatic Go code that performs poorly compared to well-written Go. Analysis tools and refactoring helped to improve the code, but much remains to be done. Further profiling and optimization will continue in Go 1.6 and future releases. And as of Go 1.17 that is pretty much forgotten waters.
- lcrz 5y agoIf you want to know more about WHY people write compilers for X in X, check out https://en.wikipedia.org/wiki/Bootstrapping_(compilers) https://en.wikipedia.org/wiki/Bootstrapping_(compilers) It's not just liking the language or eating their own dogfood.
- yatac42 5y ago> it's conceptual slow because of the language (types, implicits, ...) and it's accidentally slow because written in Scala (a slow language) on the JVM (slow startups and warmups) Do you have reason to believe that the accidental part matters to any significant degree? I mean, C++ compilers are notorious for being slow and most of them are written in C++, which is one of the fastest languages around. It seems to me that, if your language is conceptually slow to compile, the fastest implementation language in the world won't fix that problem for you. On the other hand, if your language is conceptually fast to compile, a slowish implementation language won't hurt much (I've never heard any complaints about the speed of `javac` for example though I've heard plenty of complaints about the speed of Java in general).
- Lio 5y agoMaybe but it's a great learning tool for those of us that know ruby but are less familiar, with say, C or Rust.
- UncleEntity 5y agoWell, you could apply the futamura projections and have “X written in Y compiles to Z”