Last.FM: Recently listened

Saturday, February 10, 2007

Speeding up your compiler


I recently played around with ccache. This tool caches compiled C/C++ object files. Whenever you recompile a file, it checks whether the corresponding object file is in the cache and the compiler run may be saved.

You may ask, why we need this tool although we already have build systems that determine, when files need to be recompiled. The answer is, that build systems make their decisions upon file modification times and the existence of an older object. If the object is missing - for instance because you ran "make cleanall", make will trigger a rebuild. ccache however takes a preprocessed file and matches its checksum with the one it has cached. If both match, the cached object file is used and you save the time you'd otherwise need for running the compiler.

My benchmarks took place in our L4 environment - I compiled some applications without their objects being cached. Then, I ran "make cleanall" and started the build again, this time with caching enabled. The (reasonable) speedups are shown in the picture. We can see two things:
  • C++ (Dice, C++ small) builds are sped up more than C builds (the rest). This is because compiling a C++ file typically takes much more time which is then saved by ccache.
  • Large builds (L4Linux, Dice) are sped up more than small ones (cUnit, ...), because they include more compiler runs.

Sunday, February 04, 2007

Makes you feel hit by a train

Literature is beautiful. There are loads of Terry Pratchetts and Jasper Ffordes to make you laugh and sometimes think about the wisdom that lies deep beneath their jokes. There is Nick Hornby taking you for a tour of someone else's absolutely usual life.

Literature is not always about great deeds or true heroes. Literature doesn't always make you laugh. Sometimes it is there to make you cry. It makes you feel sick. Words that hit you as if a train was crossing your path. Stories that make you want to put aside the book because you know that what happens will end up in a mess making you feel terrible for the rest of the day or even more. But on the other hand you simply can't let go, because you are enchanted by the words.

Even though (or exactly because?) the story is narrated in many different ways, even though you have to build it in your head from the patches of information you gain from the book, even though there is much more than a simple story in the book and even though you cannot tell which parts of the story are true and which ones are phantasy, even though it is crowded of anti-heroes - some books may give your thoughts (if not your life) a new direction.

Jonathan Safran Foer's "Everything is illuminated" is one of those books. Go and get a read.