» §ë†h‘š hømép∂gê ☮ «

2008 07 10

There is a large performance hit in C++ for the common habbit of using a .end() function call in a loop parameter when iterating through a container. I wrote a small test program to demonstrate the difference. The time difference is being measured with some simple functions I wrote which use the rdtsc register to get the highest precision possible. Results are averaged over 64 tests. Feel free to insert your own code in to the loop bodies to get an idea of the relative cost of using .end() in the loop parameter.

2008 04 24

Specifying Makefile dependencies sucks. I finally got fed up with it and figured out how to autogenerate dependencies. Here is a sample Makefile that I set up to demonstrate how this would work with C++.