|
Ublas : |
From: Dima Sorkin (dsorkin_at_[hidden])
Date: 2005-11-27 02:58:30
Quoting Nico Galoppo :
> I was wondering what the performance implications of this are, eg. I have a
> templated function:
> template <typename Mat> func(Mat& M)
>
> versus
>
> template <typename C> func(matrix_container<C>& M)
>
> In the second example, to perform operations on the data, it seems that I
> need
> to apply the operator() on M every time, like
Hi.
If you have a reasonable good compiler, "operator()" will be inlined
at compile time, and there is no overhead. The overhead is in
compilation time, not in the execution time.
Regards,
Dima.