Ticket #5005 (closed defect: wontfix)

Opened 4 years ago

Last modified 3 years ago

polynomial_template __init__ from list horribly inefficient

Reported by: robertwb Owned by: tbd
Priority: major Milestone: sage-duplicate/invalid/wontfix
Component: algebra Keywords:
Cc: Work issues:
Report Upstream: N/A Reviewers:
Authors: Merged in:
Dependencies: Stopgaps:

Description

            for e in x:
                # r += parent(e)*power
                celement_pow(&monomial, &gen, deg, NULL, parent)
                coeff = (<Polynomial_template>parent(e)).x
                celement_mul(&monomial, &coeff, &monomial, parent)
                celement_add(&self.x, &self.x, &monomial, parent)
                deg += 1

There should be a celement_set(self, x, i).

Change History

comment:1 Changed 4 years ago by robertwb

  • Summary changed from polynomial_template __init__ from list horribly innefficient to polynomial_template __init__ from list horribly inefficient

comment:2 Changed 4 years ago by AlexGhitza

  • Milestone changed from sage-wishlist to sage-4.3

comment:3 Changed 3 years ago by robertwb

  • Status changed from new to closed
  • Resolution set to wontfix
  • Report Upstream set to N/A

The polynomial template framework has no c-level concept of elements of the basering, so there's not much that can be done here. Both ZZ[x] and Z/nZ[x] override __init__ to be more efficient, so it's not really an issue, and so I'm closing this as won't fix.

comment:4 Changed 3 years ago by mvngu

  • Milestone changed from sage-4.3.1 to sage-duplicate/invalid/wontfix
Note: See TracTickets for help on using tickets.