News for hackers. Stuff that matters.
Re:Why are my Go executable files so large? by eikenberry on Sunday December 29, 2019 @03:49PM (#21908359)
Personally I more wish Rust would take this approach. Rust desperately needs a fast, developer oriented compiler. The slow compile times is potentially Rusts biggest flaw, to the point where I find it keeps me off the language for anything non-trivial. Even better might be a Rust interpreter, so you'd get REPL and fast development cycles.
Re:Why are my Go executable files so large? by pcwalton on Sunday December 29, 2019 @04:04PM (#21908467)
This is why Cranelift is being worked on. There is also a Rust interpreter, miri.

I think starting with LLVM was the right decision (and one that was I was primarily responsible for). Rust would lose most of its benefits if it didn't produce code with performance on par with C++. LLVM is not the fastest compiler in the world (though it's not like it's horribly slow either), but its optimization pipeline is unmatched. I don't see replicating LLVM's code quality as feasible without a large team and a decade of work. Middling code gen performance is an acceptable price to pay until we get Cranelift; the alternative, developing our own backend, would mean not being able to deploy Rust code at all in many scenarios.

Re:Why are my Go executable files so large? by voldacar on Sunday December 29, 2019 @04:53PM (#21908798)
Forgive me if this is ignorant, since I havent done any benchmarks on this in a while, but doesnt GCC produce slightly faster code on average across a wide set of benchmarks compared to clang/LLVM?
Re:Why are my Go executable files so large? by pcwalton on Sunday December 29, 2019 @04:55PM (#21908819)
Perhaps, but the advantages of a large third-party ecosystem around LLVM outweighed any performance differences between GCC and LLVM.
Re:Why are my Go executable files so large? by oscargrouch on Sunday December 29, 2019 @05:42PM (#21909115)
At least in these benchmarks that phoronix run time-to-time, (so they at least can be compared to their older self) LLVM, in its Clang incarnation, is finally getting some parity in execution times with GCC

https://www.phoronix.com/scan.php?page=article&item=gcc-clan...

Of course, benchmarks, yada yada, but at least is some sort of comparison axis where the improvement over the years is clear.

Re:Why are my Go executable files so large? by voldacar on Sunday December 29, 2019 @07:07PM (#21909605)
Thanks for the link. I was probably thinking about some older phoronix benchmarks when I made my post
Re:Why are my Go executable files so large? by eikenberry on Sunday December 29, 2019 @04:44PM (#21908730)
Thanks for the pointer! I was unfamiliar with Cranelift and it seems like a promising tech. I'll keep an eye on it in hopes that once it is stable I'll be able to put together a development environment that allows for the fast turnaround I prefer.
Re:Why are my Go executable files so large? by MarkSweep on Sunday December 29, 2019 @05:53PM (#21909179)
I have not used rust for anything very large, but the using an editor that supports the rust language server mitigates the compile time problem. In VSCode it show you the compiler warnings and errors as you are editing a file. There is a little lag in updating but the workflow is faster than switching to a terminal to do a full compile.
Re:Why are my Go executable files so large? by ComputerGuru on Monday December 30, 2019 @04:05AM (#21911933)
Slow compile is a developer problem. Big binaries is a problem for both developers and users.

Typically, developers can afford to throw more cores and more ram at their build machines.

Re:Why are my Go executable files so large? by mixedCase on Sunday December 29, 2019 @03:54PM (#21908397)
Isn't Cranelift going to be usable for that?