On Dec 20, 2008, at 12:31 PM, Craig Citro wrote:

> That example was with CyclotomicField(12) and CyclotomicField(132) ...

Ah. I bet the time was spent resolving the roots of CyclotomicField 
(132) to high enough precision to distinguish them. If you don't come  
up with a patch for this, I'll (probably) do it later tonight.

- Robert

>
> -cc
>
> On Sat, Dec 20, 2008 at 12:25 PM, Robert Bradshaw
> <rober...@math.washington.edu> wrote:
>>
>> On Dec 20, 2008, at 12:16 PM, mabshoff wrote:
>>
>>> On Dec 20, 12:11 pm, "Craig Citro" <craigci...@gmail.com> wrote:
>>>
>>>
>>> <SNIP>
>>>
>>>> So just running this through prun suggests that it's something
>>>> related
>>>> to coercion:
>>>>
>>>>    ncalls  tottime  percall  cumtime  percall filename:lineno
>>>> (function)
>>>>     17/11   13.884    0.817   14.137    1.285
>>>> number_field.py:1502(_coerce_map_from_)
>>>>
>>>> I'll have time to start looking into this later this afternoon,
>>>> unless
>>>> someone beats me to it ...
>>>
>>> Yep, a likely candidate is #4276, but that is a 100kb diff, so maybe
>>> you should ask RoberWB for a hint.
>>>
>>> Note that in the modular/modform directory that is the only doctest
>>> that got measurably slower, but I would not be surprised if  
>>> something
>>> else in number fields would also show some performance differences.
>>> This is another case where the timeit framework would come in handy.
>>> Since it has been in for a while and basically unchanged  
>>> hopefully we
>>> can run regression tests back a couple of releases. Getting  
>>> timeit to
>>> compare different runs is definitely an excellent project for SD12
>>> should we not have it in place by then.
>>
>> Hmm... I think I know what causes this. Basically, to find a coercion
>> between two cyclotomic fields, it finds all roots of each (by
>> factoring the polynomial over the complex numbers) and matches up the
>> closest one. For cyclotomic fields it could easily determine right
>> away where the root goes.
>>
>> Do you have examples of the size of fields it's dealing with here?
>>
>> - Robert
>>
>>
>>>
>>
>
> >


--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to 
sage-devel-unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---

Reply via email to