Boost::multi_array performance question

前端 未结 16 2133
不思量自难忘°
不思量自难忘° 2020-12-04 11:20

I am trying to compare the performance of boost::multi_array to native dynamically allocated arrays, with the following test program:

#include 

        
16条回答
  •  一向
    一向 (楼主)
    2020-12-04 12:10

    I modified the above code in visual studio 2008 v9.0.21022 and applied the container routines from the Numerical Recipe routines for C and C++

    http://www.nrbook.com/nr3/ using their licensed routines dmatrix and MatDoub respectively

    dmatrix uses the out of date syntax malloc operator and is not recommended... MatDoub uses the New command

    The speed in seconds are in Release version:

    Boost: 0.437

    Native: 0.032

    Numerical Recipes C: 0.031

    Numerical recipes C++: 0.031

    So from the above blitz looks like the best free alternative.

提交回复
热议问题