Question

I have just started using Boost 1.36. These libraries would be very useful in reducing the amount of code needed in the unmanaged C++ software project that I am working on.

However when I tried to used these libraries my compile times increased ten fold. This would pretty much offset the productivity gains I would receive by using the library.

I am using a 3GHz Intel Dual Core with 2GB of RAM and VS 2003.

There is a snippet of the code that I added.

#include "boost/numeric/ublas/matrix.hpp"   
#include "boost/numeric/ublas/vector.hpp"  
#include "boost/numeric/ublas/matrix_proxy.hpp"  

typedef ublas::bounded_matrix <long double,NUM_OF_COLUMNS,NUM_OF_CATEGORIES,ublas::row_major> Matrix;  
typedef ublas::bounded_vector <long double,NUM_OF_COLUMNS> Vector;  

void Print(const Matrix& amount)
{

Vector total;

total.clear();
for (int category = 0; category < NUM_OF_CATEGORIES; category++)
{
    PrintLine(ublas::row(amount, category));
    total += ublas::row(amount, category);
}

PrintLine(total);   

}

Is the problem with VS 2003?
I know that VS 2008 is faster but upgrading is going to be a hard sell.
Is it just that Boost is optimized for fast run times not fast compile times?
Am I just using the Boost Library in a sub-optimal manner?
Or am I just using the wrong tool for the job?

Was it helpful?

Solution

Have you tried using precompiled headers? That is including the boost headers in StdAfx.h or whatever header file you use for precompiled headers?

OTHER TIPS

Did you try Incredibuild? It will allow you to distribute your build on multiple computers. I have seen it used successfully.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top