[Maxima] quad_qag slow due to compilation at each step?

Raymond Toy (RT/EUS) raymond.toy at ericsson.com
Wed Mar 12 14:39:09 CDT 2008


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


More information about the Maxima mailing list