Monthly Archives: October 2013

On comparing languages, C++ and Go

Implementing the business card-sized raytracer in your favorite language and benchmarking it against other languages is the trend these days. It all started with Fabien Sanglard beautiful breakdown of the ray tracer written in C++.

Whilst the raytracer has been written in many languages since then, the major heat seems to be between C++ and Go. Henrik writes:

Because when you actually do code for performance, in those small bits of code in inner loops where it’s warranted to do so, your priorities change. The language you code in ends up being… less relevant, abstractions fade away and you try to divine communication directly with the hardware that will be running your code.

All these benchmarking might be a fanboy-thing, but they have certainly paved way to lots of insights.

Global Git ignore

I feel stupid for not being aware of a global git ignore earlier. It’s a good approach to globally ignore those editor-specific swap files, OS-specific crap (like .DS_Store in OS X) etc. From usevim:

A better approach is to use a global option. Run git config –global core.excludesfile ~/.gitignore. Then you can add *.sw?, and perhaps *~ as well. I like to add .DS_Store because Windows developers don’t need to worry about that nonsense, and they should probably add Thumbs.db.

The trick is to add globally-ignored files into some place like ~/.gitignore and specifying this in core.excludesfile.