#18987: Parallel computation for TilingSolver.number_of_solutions
-------------------------+-------------------------------------------------
       Reporter:         |        Owner:
  slabbe                 |       Status:  needs_review
           Type:         |    Milestone:  sage-6.9
  enhancement            |   Resolution:
       Priority:  major  |    Merged in:
      Component:         |    Reviewers:  Vincent Delecroix
  combinatorics          |  Work issues:
       Keywords:         |       Commit:
        Authors:         |  2133ecdcffb1b993049874c8be6cad2b1224a73a
  Sébastien Labbé        |     Stopgaps:
Report Upstream:  N/A    |
         Branch:         |
  public/18987           |
   Dependencies:         |
-------------------------+-------------------------------------------------

Comment (by vdelecroix):

 Replying to [comment:44 slabbe]:
 > Replying to [comment:42 vdelecroix]:
 > > Are you sure `ncube_isometry_group` is worth a `@cached_function`?
 >
 > Calling this function takes 2.8s on my machine. And it is called once
 for each polyomino. That is 16 times for the Quantumino puzzle. With the
 cache, I gain about 40s to construct the rows to give to the dlx solver.

 Perhaps the way it is implemented is wrong. For example
 {{{
 sage: %timeit P = [s.matrix() for s in SymmetricGroup(4)]
 1 loops, best of 3: 1.27 ms per loop
 }}}
 and with the signs
 {{{
 sage: from itertools import product
 sage: %timeit M = [diagonal_matrix(p) for p in product([1,-1], repeat=4)]
 1 loops, best of 3: 2.9 ms per loop
 sage: M = [diagonal_matrix(p) for p in product([1,-1], repeat=4)]
 sage: %timeit S = [m*s.matrix() for m in M for s in SymmetricGroup(4)]
 100 loops, best of 3: 18.3 ms per loop
 }}}
 So it is likely to be `~20ms`.

--
Ticket URL: <http://trac.sagemath.org/ticket/18987#comment:46>
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/d/optout.

Reply via email to