Hacker News new | past | comments | ask | show | jobs | submit login

"Are optimizing compilers a good idea?"

Look if you replace 1 representation with another that is _correct_ (to within the human author's reason), but faster. You have the identical discussion, and an answer (yes).




Well, there's another aspect: "Is it OK to design a language that will be unusable without an optimizing compiler?"

Running any normal language without an optimizing compiler is totally fine and routinely done. Here we're talking about languages that might be thousands or millions of times slower.


Compared to a optimizing compiler, a fresh implementation for a language would probably also be thousands/millions of times slower, unless the codebase implements the optimizations itself.

And then you end up speeding up the compiler to reach a decent state, to speed up the code

But time to reach initial compiler is much faster with a jet-based one (there's barely anything to the language).

and then you end up adding jets to reach a decent state

I'm not sure there's a significant difference in this regard. The main question, I think, is which is easier/simpler/faster to optimize into a proper state, and in the case of compiler optimization being better, if its sufficiently better to beat the ease of initial implementation for a jet-dependent language


It would be great if optimizers made code 1000x or 1000000x faster, but apart from some edge cases like the removal of ineffectual loops, disabling optimization in any compiler shows that ~10x is more realistic.

My day job is writing compilers (for traditional languages), and I have no doubt that it's significantly easier/simpler/faster to implement the jet based one.

However, the jets only apply to known algorithms, so it's really more like an optimized library than a compiler technique. Code that uses the "library" will be really fast with little effort, but anything that requires functionality not directly found in the library will get the 1000-1000000x overhead, while the traditional compiler will run it all with ~10x overhead.

I totally agree that it's the perfect fit for long-lived, highly heterogenous, correctness first applications like blockchain, but I don't see how it'll be useful for general purpose languages.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: