Re:No Compiler – On LLVM, and writing software without a com...
by Manishearth on Sunday March 06, 2016 @11:48PM
(#11237156)
Heh, I was in this same boat two years ago. Servo used to build its own Rust back then, and that involved building llvm. I hadn't yet discovered ccache[1] and I had an old 4GB RAM laptop with a Core something processor. Took 4-6 hours total IIRC. This was also a really old laptop, so that was understandable. But very very annoying, since sometimes I'd need to rebase over a rustup and then wait hours for the build to work. This was a large part of my impetus to move servo to a state where we download Rust snapshots.
[1]: Btw, if LLVM compile times are getting to you, Use. Ccache. It is amazeballs.
Re:No Compiler – On LLVM, and writing software without a com...
by bitJericho on Saturday March 05, 2016 @03:08AM
(#11228845)
A core duo isn't even in the realm of mid-range. That's very nearly a 10 year old processor!
Re:No Compiler – On LLVM, and writing software without a com...
by pjmlp on Saturday March 05, 2016 @05:16AM
(#11229059)
Yeah, but it works perfectly well as a travel netbook for coding on the go.
Also I never had 4h builds with single core processors back when I was working full time with C++. The slowest ones were around 2h.
A core duo would run circles around those computer systems, hence my dismay how much hardware LLVM requires for building.
Re:No Compiler – On LLVM, and writing software without a com...
by bitJericho on Saturday March 05, 2016 @05:28AM
(#11229082)
I would imagine compiler design has become much more complex in 10 years, and a low end i3 is something like at least 3 times faster than a core duo.
Re:No Compiler – On LLVM, and writing software without a com...
by pjmlp on Saturday March 05, 2016 @06:07AM
(#11229147)
I would agree if other compilers, not LLVM based, took as much to compile.
Also that is surely a side effect how they are using C++, which desperately needs modules.
Re:No Compiler – On LLVM, and writing software without a com...
by pcwalton on Sunday March 06, 2016 @06:08PM
(#11236049)
Those compilers don't do nearly as much optimization as LLVM does. It's hard to overstate how wide the gap between the classical compilers you like and LLVM/GCC truly is. LLVM has no fewer than three IRs, each with a full suite of compiler optimizations (four if you count ScheduleDAG). LICM, just to name one example, runs at each stage (see MachineLICM.cpp). Turbo Pascal did nowhere near that level of optimization, and it produced unacceptably slow programs by modern standards.
I can assure you it really does take 4 hours.
And to bring the point home, I can link you to the Swift issue where I was discussing this matter.