4 ms·
Imagine a compiler that recognizes when you're attempting to compile Firefox from source. It checks your internet connection speed and hashes all the source fil
by function_seven 11y ago
Imagine a compiler that recognizes when you're attempting to compile Firefox from source. It checks your internet connection speed and hashes all the source files. If your Internet connection is sufficient, and the hashes match, this nifty compiler would "optimize" the compilation by downloading the matching binary from mozilla.org.
- kazinator 11y agoccache hashes the preprocessed input to gcc, hashes it, and pulls out a previously compiled object file if possible. You can use it together with distcc to farm out jobs to other machines; whether you pick their caches or yours depends on the order of ccache and distcc on the command line.
- wlievens 11y agoSo basically any caching strategy? Compiler optimisation isnt about compiling faster, though :-)
- throwupaway1138 11y agoOf course it is, at least if the optimized compiler is compiled with an optimized compiler, but also generally fast compilation is optimal.
- wlievens 11y agoFast compilation is a worth goal, but it's not fundamentally different from optimizing other kinds of programs: it involves good selection of data structures and algorithms, smart caching, that sort of stuff. Compiler optimization (in the sense of optimizing the emitted code) is a research area of its own with millions of man hours invested.