Subject: quad_qag slow due to compilation at each step?
From: Raymond Toy (RT/EUS)
Date: Wed, 12 Mar 2008 15:39:09 -0400
dlakelan wrote:
> dlakelan wrote:
>> I'm not sure, but I am beginning to suspect that my code may be very
>> slow because quad_qag calls get-integrand which calls compile. I am
> ...
>
> I should mention that I am using SBCL
SBCL has a relatively slow compiler.
If you can compile maxima, perhaps you can modify get-integrand to use
the gcl version. If you can't (or don't want to), can you provide an
example of the function you're integrating?
The quadpack routines compile the integrand because the integrand can be
evaluated hundreds or tens of thousands of times per call to quad_*.
If you're using quad_qag, then the number of calls is limited because
it's not adaptive, so perhaps quad_qag should not compile the integrand.
Ray