Chris Baus

Strategy vs Policy performance test

I'm working on some ideas to use as a basis for discussing performance issues -- a popular topic these days. I whipped up an example over the weekend in C++ which compares the performance of two popular Inversion of Control implementations in C++: Strategy and Policy. From an architectural standpoint, both allow the behavior of classes and libraries to be modified by users. In C, function pointers solve basically the same problem.

Before I offer any leading commentary, take a look at the code. I'm interested what developers think the outcome will be before they execute it.

More discussion on Joel's board. What I'm getting at here is the relativeness of performance issues.