Skip to content

speed up Maxima computations by using more of maxima_calculus.eval() #30071

@dimpase

Description

@dimpase

Empirically, maxima_calculus.eval() is 5-7 times faster than maxima.eval(), cf. e.g.

sage: timeit("L = [(i/100.0, maxima_calculus.eval('jacobi_sn (%s/100.0,2.0)'%i)) for i in range(-300,300)]")
5 loops, best of 3: 110 ms per loop
sage: timeit("L = [(i/100.0, maxima.eval('jacobi_sn (%s/100.0,2.0)'%i)) for i in range(-300,300)]")
5 loops, best of 3: 556 ms per loop

For some reason, there are dozens of maxima.eval calls in sage/[src,doc] - and none of maxima_calculus.eval. Just going and changing these will be an improvement (in particular, on Cygwin, where pexpect is very flaky, cf #22191).

maxima.jacobi_sn() is also much slower than
maxima_calculus.jacobi_sn()

This should be a part of #17753.

CC: @nbruin @rwst @kcrisman

Component: interfaces

Issue created by migration from https://trac.sagemath.org/ticket/30071

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions