-
-
Notifications
You must be signed in to change notification settings - Fork 522
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Trac #25609: have libgap permutation to sage use permutation instead …
…of permutation group element This is a side improvement of #25477, as seen there in comment 62 (please properly link if possible): {{{ sage: P = PermutationGroup([(1,2),(1,2,3,4,5,6,7,8)]) sage: l = [8,7,6,5,4,3,2,1] sage: %timeit P(l, check=False) The slowest run took 7.58 times longer than the fastest. This could mean that an intermediate result is being cached. 10000 loops, best of 3: 44.3 µs per loop sage: %timeit Permutation(l, check_input=False) The slowest run took 7.85 times longer than the fastest. This could mean that an intermediate result is being cached. 100000 loops, best of 3: 6.74 µs per loop }}} So creating a new permutation is much faster than creating a permutation group element. If we know which permutation group we live in, there is even a faster way: {{{ sage: one = P.one() sage: %timeit one._generate_new(l) The slowest run took 128.70 times longer than the fastest. This could mean that an intermediate result is being cached. 1000000 loops, best of 3: 241 ns per loop }}} URL: https://trac.sagemath.org/25609 Reported by: stumpc5 Ticket author(s): Christian Stump Reviewer(s): Travis Scrimshaw
- Loading branch information
Showing
5 changed files
with
35 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters