Subject: Re: [ublas] How to speed up the compilation?
From: Gunter Winkler (guwi17_at_[hidden])
Date: 2008-09-09 16:44:41
Peng Yu schrieb:
> In the ublas doc, it says, "To achieve the goal of efficiency for
> numerical computing, one has to overcome two difficulties in
> formulating abstractions with C++, namely temporaries and virtual
> function calls. Expression templates solve these problems, but tend to
> slow down compilation times."
"slow" is relative. The full compilation of my FEM program which makes
heavy use of ublas takes now less than a minute. So I see no real
problem with long compilation times. If this is still to slow then you
could restrict yourself to "double" and "size_t" instead of generic
floating point and integer types. Then the compilation is only a factor
2-4 times slower than for plain C++. (Of course this changes when you
enable optimizations ...)