On Mon, Jan 19, 2015 at 8:55 AM, Ralf Stephan <gtrw...@gmail.com> wrote:
> On Sunday, January 18, 2015 at 9:18:53 AM UTC+1, vdelecroix wrote:
>>
>> Your example can be reduced to polynomials
>>
>> sage: K.<sqrt3> = QuadraticField(3)
>> sage: R.<a1,a2,a3,a4,a5> = K[]
>> sage: timeit("(a1+a2+a3+a4+sqrt3*a5)^25")
>> 5 loops, best of 3: 81 ms per loop
>
>
> How do you get this speed? Here it's three orders of magnitude slower.

What is "here"?

When I try it on SageMathCloud it's almost 4 *times* slower, so "half
of an order of magnitude":

https://cloud.sagemath.com/projects/4a5f0542-5873-4eed-a85c-a18c706e8bcd/files/support/2015-01-19-expand-speed.sagews

Since that expression is large, the cache size of the CPU might
significantly impact performance.

William


>
> BTW another way is to use polynomials over SR, for about the same
> speed but without number field restrictions.
>
>
> Regards,
>
> --
> You received this message because you are subscribed to the Google Groups
> "sage-devel" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to sage-devel+unsubscr...@googlegroups.com.
> To post to this group, send email to sage-devel@googlegroups.com.
> Visit this group at http://groups.google.com/group/sage-devel.
> For more options, visit https://groups.google.com/d/optout.



-- 
William Stein
Professor of Mathematics
University of Washington
http://wstein.org

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.

Reply via email to