4 ms·
Cat *.c >tmp.c && gcc -O3 -fwhole-program $YOURFLAGS -o ohmygawditsfast tmp.c
This will get you warp-speed if there're no clashes. -Os instead of -O3 makes another wet dream come true (guess which).
- wtallis 16y agoOr, just use LLVM's link time optimization: http://llvm.org/docs/LinkTimeOptimization.html http://llvm.org/docs/LinkTimeOptimization.html
- mrpixel 16y agoGCC is going to have that, too. http://gcc.gnu.org/wiki/LinkTimeOptimization http://gcc.gnu.org/wiki/LinkTimeOptimization
- neilc 16y agoIn fact, it already does have it: LTO is supported by GCC 4.5.0, which was released in April. (Although a bunch of LTO improvements will be included in the forthcoming GCC 4.6 release.)
- amock 16y agoIt's not a C compilers, but Mlton is an interesting SML whole program compiler. There's also JHC for Haskell which is nifty but can't quite compile all Haskell programs. I also found the Stalin Scheme compiler very interesting since it seems like a whole program compiler for a dynamically typed language like Scheme should be able to do a lot of interesting things.
- leppie 16y agoWhy not just pass *.c to gcc ? Same thing isn't it?