Skip to content

fast construction of symbolic sums #23417

@rwst

Description

@rwst

In legendre_P::eval_pari there is this:

return sum(b * arg**a for a, b in enumerate(pol))

Due to GiNaC::add::eval mechanics it has quadratic performance, fortunately eased by smart pointer operations. Much better however would be to have the iterator add to an GiNaC::exvector and construct the GiNaC::add from that. There is GExVector.push_back and g_add_construct in the Pynac interface already available.

Component: symbolics

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

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