Compare blitz++, armadillo, boost::MultiArray

后端 未结 3 824
既然无缘
既然无缘 2020-12-25 12:10

I did a comparison between blitz++, armadillo, boost::MultiArray with the following code (borrowed from an old post)

#include 
using namespac         


        
3条回答
  •  既然无缘
    2020-12-25 12:55

    My test showed boost arrays had the same performance as the native/hardcoded C++ code.

    You need to compare them using compiler optimisations activated. That is: -O3 -DNDEBUG -DBOOST_UBLAS_NDEBUG -DBOOST_DISABLE_ASSERTS -DARMA_NO_DEBUG ... When I tested (em++), Boost performed at least 10X faster when you deactivate its asserts, enable level 3 optimisation using -O3, etc. Any fair comparison should use these flags.

提交回复
热议问题