dolfin team mailing list archive
-
dolfin team
-
Mailing list archive
-
Message #23675
Re: [noreply@xxxxxxxxxxxxx: [Branch ~dolfin-core/dolfin/wells] Rev 5923: Replace Legendre code with Boost Legendre code.]
-
To:
Anders Logg <logg@xxxxxxxxx>
-
From:
"Garth N. Wells" <gnw20@xxxxxxxxx>
-
Date:
Thu, 02 Jun 2011 10:46:29 +0100
-
Cc:
dolfin@xxxxxxxxxxxxxxxxxxx
-
In-reply-to:
<20110602092616.GJ12747@smaug>
-
User-agent:
Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.17) Gecko/20110424 Thunderbird/3.1.10
On 02/06/11 10:26, Anders Logg wrote:
> On Thu, Jun 02, 2011 at 10:07:59AM +0100, Garth N. Wells wrote:
>>
>>
>> On 01/06/11 23:46, Anders Logg wrote:
>>> Have you checked that there is no performance penalty?
>>
>> I just have - evaluating a Legendgre polynomial 10k times at the same
>> point is just noise with both methods (of the order 10^-5 - 10^-4 s).
>
> It may be noise for some applications, but not for others. I'm not
> sure this is a bottle-neck for the ODE code (Benjamin will know) but
> we need to evaluate Legendre polynomials of degree > 100 many times
> and then it may not be noise.
>
For very high degree (e.g. 200) Boost is marginally faster.
>> The Boost code is slightly slower because it doesn't cache the values
>> (which is nice not to do), but may be faster if the call is inlined.
>> It's not possible to inline it at the moment because of clashes between
>> tr1:tuple and boost::tuple (Boost bug, I suspect). Old and new are the
>> same when evaluating at different points.
>
> Let's wait for Benjamin to comment.
>
The speed is about the same (with scope to improve the speed for Boost)
for unique values. The caller should be responsible for caching, if
desired, since it can lead to memory blow out.
Legendre does not appear in the ode code. It only appears in the
computation of quadrature schemes.
Garth
> --
> Anders
>
>
>> Garth
>>
>>
>>> Benjamin has
>>> worked quite hard on optimizing some of the basic math routines (in
>>> some cases by many many orders of magnitude).
>>>
>>> Benjamin, can you take a look that it still works?
>>>
>>
>> _______________________________________________
>> Mailing list: https://launchpad.net/~dolfin
>> Post to : dolfin@xxxxxxxxxxxxxxxxxxx
>> Unsubscribe : https://launchpad.net/~dolfin
>> More help : https://help.launchpad.net/ListHelp
Follow ups
References