Skip to content
Snippets Groups Projects
Commit 4104e4d5 authored by Oliver Sander's avatar Oliver Sander
Browse files

This patch removes the template metaprogramming for norms and the dot

product.  Measuring the impact on efficiency gave the same results
as for the older TMP stuff.  When compiled with -O3 (g++ 4.1), there
is no measurable speed difference between the old and the new code.
That is so even though temporary variables had to be inserted.
When compiling without optimization, the new code is faster,
presumably because a standard for-loop is faster than a cascade
of function calls.  Depending on your vector size, this speedup
can be considerable!  For a six-entry FieldVector repeatly computing
norms gets about 40% faster.

This concludes FlySpray issue 46.

[[Imported from SVN: r4759]]
parent a47001e3
Branches
Tags
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment