I am trying to compare the performance of boost::multi_array to native dynamically allocated arrays, with the following test program:
#include 
         
I am wondering two things:
1) bounds check: define the BOOST_DISABLE_ASSERTS preprocessor macro prior to including multi_array.hpp in your application. This turns off bound checking. not sure if this this is disables when NDEBUG is.
2) base index: MultiArray can index arrays from bases different from 0. That means that multi_array stores a base number (in each dimension) and uses a more complicated formula to obtain the exact location in memory, I am wondering if it is all about that.
Otherwise I don't understand why multiarray should be slower than C-arrays.