Improve compilation speed in VS-project using Boost C ++ libraries

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

However, when I tried to use these libraries, compilation time increased tenfold. This would greatly compensate for the performance gain that I could get using the library.

I use a dual-core Intel 3GHz processor with 2 GB of RAM and VS 2003.

There is a code snippet 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);   

} Code>

Is there a problem with VS 2003?
I know that VS 2008 is faster, but the upgrade will be a hard sell.
Is it just that Boost is optimized for quick start rather than fast compilation time?
Am I just using the Boost library in suboptimal order?
Or am I using the wrong tool to work?

+3
source share
2 answers

? StdAfx.h , ?

+5
+1

Source: https://habr.com/ru/post/1697845/


All Articles