#15654: PARI discriminant speed depends on stack size
-------------------------------+------------------------
       Reporter:  jdemeyer     |        Owner:
           Type:  defect       |       Status:  new
       Priority:  critical     |    Milestone:  sage-6.1
      Component:  performance  |   Resolution:
       Keywords:               |    Merged in:
        Authors:               |    Reviewers:
Report Upstream:  N/A          |  Work issues:
         Branch:               |       Commit:
   Dependencies:               |     Stopgaps:
-------------------------------+------------------------
Description changed by jdemeyer:

Old description:

> This is weird and bad:
> {{{
> sage: x = polygen(ZpFM(3,10))
> sage: p = ((x-1)^50 + x)._pari_init_()
> sage: %time pari(p).poldisc()
> CPU times: user 59.20 s, sys: 0.01 s, total: 59.21 s
> Wall time: 59.35 s
> 2*3 + 3^4 + 2*3^6 + 3^7 + 2*3^8 + 2*3^9 + O(3^10)
> sage: %time gp(p).poldisc()
> CPU times: user 0.00 s, sys: 0.01 s, total: 0.01 s
> Wall time: 0.16 s
> 2*3 + 3^4 + 2*3^6 + 3^7 + 2*3^8 + 2*3^9 + O(3^10)
> }}}
>
> The problem isn't PARI itself (given the speed of `gp`), it's somehow the
> PARI interface in Sage.
>
> This happens both before and after the various PARI cleanup tickets in
> Sage 6.1.

New description:

 This is weird and bad:
 {{{
 sage: x = polygen(ZpFM(3,10))
 sage: p = ((x-1)^50 + x)._pari_init_()
 sage: %time pari(p).poldisc()
 CPU times: user 52.73 s, sys: 0.00 s, total: 52.73 s
 Wall time: 52.82 s
 2*3 + 3^4 + 2*3^6 + 3^7 + 2*3^8 + 2*3^9 + O(3^10)
 sage: pari.allocatemem(2<<20)
 PARI stack size set to 2097152 bytes
 sage: %time pari(p).poldisc()
 CPU times: user 0.08 s, sys: 0.00 s, total: 0.08 s
 Wall time: 0.08 s
 2*3 + 3^4 + 2*3^6 + 3^7 + 2*3^8 + 2*3^9 + O(3^10)
 }}}

--

--
Ticket URL: <http://trac.sagemath.org/ticket/15654#comment:2>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica, 
and MATLAB

-- 
You received this message because you are subscribed to the Google Groups 
"sage-trac" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to