#5658: Efficiency improvement in generic order_from_multiple()
-------------------------+--------------------------------------------------
Reporter: cremona | Owner: tbd
Type: enhancement | Status: new
Priority: minor | Milestone: sage-3.4.1
Component: algebra | Keywords: generic group order
-------------------------+--------------------------------------------------
Ryan Hinton pointed out that for groups of prime order n every non-
identity element has order n. The current implementation of
order_from_multiple() computes {{{g^n}}} twice when g is not the identity
and n is prime.
The attached patch avoids this: for each prime p dividing the given
multiple M of the order, we avoid the last multiplication/powering by p,
so there is a saving whenever the p-exponent of the order is maximal.
In an example where the order is {{{2^1279-1}}} (a Mersenne prime) the
times was reduced from 100ms to 70ms.
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/5658>
Sage <http://sagemath.org/>
Sage - Open Source Mathematical Software: Building the Car Instead of
Reinventing the Wheel
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/sage-trac?hl=en
-~----------~----~----~----~------~----~------~--~---