$include_dir="/home/hyper-archives/boost/include"; include("$include_dir/msg-header.inc") ?>
From: Andy Little (andy_at_[hidden])
Date: 2006-08-22 08:02:32
"Matthias Troyer" <troyer_at_[hidden]> wrote in message
news:E934060C-FDD6-40AC-A575-1B4907DBDF6D_at_itp.phys.ethz.ch...
>
> On Aug 21, 2006, at 8:38 AM, Andy Little wrote:
>
>>
>> "Matthias Troyer" <troyer_at_[hidden]> wrote
>>
>> <...>
>>
>>>> The above creates a lot of temporaries of course.
>>>
>>> Why? Using expression templates there will be absolutely no
>>> temporaries.
>>
>> In my experiments with E.T, I found that it only became
>> advantageous when use
>> with (say) a vector of more than 4 elements. Before that it seemed
>> to create
>> more temporaries than eager evaluation. I seem to remember someone
>> else backing
>> this up somewhere too.
>
> That's strange since there should be no temporaries at all. The only
> thing to keep in mind is that in short loops over only 3 or 4
> elements the time often gets dominated by the control structure of
> the loop and the inability to fill pipelines efficiently. Using small
> fixed-size data structures, such as the TinyVector in Blitz++
> completely remedies that problem, and Dave's matrix library will take
> care of this as well. You still have not shown any reason why a
> special purpose matrix and vector library in Quan would be needed or
> useful.
I suppose that at the end of the day, I am just interested in writing a very
basic linear algebra library for Quan, especially to try to understand
quaternions.
regards
Andy Little