Second version of this patch, still based on my fork: http://pastebin.ca/1900478 version statements are inside the functions now. I removed the heap allocation when formatting log messages in the Tango version, see the writeLog function. It's possible that I went a bit overboard on that one, but at least it's as fast as it gets now.