
Hi, Finally I only had the time to test on Linux with GCC 4. Here are the executable size, compilation time and execution time of the test suite pow_test.cpp for each "pow.hpp.#" file attached to this mail. Each time is an average of 6 times. 0 (2758478 bytes): 17.476s, 2.174s 1 (2746484 bytes): 17.367s, 2.228s 2 (2747612 bytes): 17.345s, 2.217s 3 (2748912 bytes): 17.326s, 2.157s 4 (2748104 bytes): 17.331s, 2.201s 5 (2790112 bytes): 17.809s, 2.181s Given that an empty implementation of pow (always returning 1) gives a size of 2230722, a compilation time of 14.576s and an execution time of 1.941s, we can subtract this result to every result above to see more precisely what the deltas between solutions really represent: #0 (527756 bytes): 2.900s, 0.233s #1 (515762 bytes): 2.791s, 0.287s #2 (516890 bytes): 2.769s, 0.276s #3 (518190 bytes): 2.750s, 0.216s #4 (517382 bytes): 2.755s, 0.260s #5 (559390 bytes): 3.233s, 0.240s In the end, the differences are very small. We notice a big compile-time overhead for #5, due to the use of MPL, that immediately discards it. The best compromise seems to be obtained with #3, which gives good compilation and execution times. Its executable size is a bit high, but not as high as for the only solution giving a better execution time, that is #0. So I'm going to make a new version based of #3 if everybody's OK with that. Bruno