Re:Compiler Development: Rust or OCaml?
by freeopinion on Monday August 07, 2023 @08:23PM
(#37042840)
Did Microsoft rewrite their C++ compiler in C#?
They did in the past, in something like LLVM, but based on MSIL, it was called Phoenix done by Microsoft Research.
In any case, it wouldn't make sense from having a bootstraped compiler point of view.
Re:Compiler Development: Rust or OCaml?
by JonChesterfield on Monday August 07, 2023 @09:34PM
(#37043360)
Any compiler that gets used at runtime (branded JIT, usually) ends up growing performance hacks or being written from scratch to run quickly. Javascript is prone to using multiple compilers based on how frequently code was executed. That's also what the whole -O0 -O3 -flto -thin-lto -pgo etc flags are about, granting permissions to burn different amounts of time during compilation.
It's really easy to accidentally write code that walks off a performance cliff on unexpected input, but that's likely to get hacked around if someone reports it as slow compilers do annoy people.
I'd want to believe that compiler engineers really put effort into compilers performance, but I just don't buy it.
LLVM, GCC, MSVC, etc, etc all of them touch C/C++ and are slow as hell
For compilers written in other languages I'd say that still LLVM is the bottleneck
>It avoids the cost of automatic memory management and provides low-level control.
What "low-level control" do you need? It is not firmware development.
Btw: Microsoft rewrote their C# compiler from C++ to C#.