Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cheap speedup in the OA recursive constructions #16499

Closed
nathanncohen mannequin opened this issue Jun 19, 2014 · 19 comments
Closed

Cheap speedup in the OA recursive constructions #16499

nathanncohen mannequin opened this issue Jun 19, 2014 · 19 comments

Comments

@nathanncohen
Copy link
Mannequin

nathanncohen mannequin commented Jun 19, 2014

There is a lot to save by not trying to build an Orthogonal Array when ... we already know that we are going to fail.

This is the case when orthogonal_arrays(k-1,n) was called and returned "Unknown" : there is no point in trying to build an orthogonal_array(k,n) later.

This can be cheaply fixed by querying the cache before trying to build the design.

The "clean" fix would be to introduce a is_available along with the existence parameter, but this interface will probably change very soon so it is not the right time to touch all functions and deal with all combinations of existence/available/etc because of that. Besides, the current fix already does the job quite well.

This will all become an Object Oriented Hell quite soon anyway .... :-P

Nathann

Depends on #16423

CC: @videlec

Component: combinatorial designs

Author: Nathann Cohen

Branch/Commit: b329351

Reviewer: Vincent Delecroix

Issue created by migration from https://trac.sagemath.org/ticket/16499

@nathanncohen nathanncohen mannequin added this to the sage-6.3 milestone Jun 19, 2014
@nathanncohen
Copy link
Mannequin Author

nathanncohen mannequin commented Jun 19, 2014

comment:1

Oh. And this patch also renames some private methods in a more "object oriented" way. Maybe it will become a real object, someday. Or be rewritten in Cython.

Life.

You never know.

Nathann

@nathanncohen
Copy link
Mannequin Author

nathanncohen mannequin commented Jun 19, 2014

Branch: u/ncohen/16499

@nathanncohen nathanncohen mannequin added the s: needs review label Jun 19, 2014
@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Jun 19, 2014

Branch pushed to git repo; I updated commit sha1. New commits:

004833atrac #16347: Wilson's construction with two truncated groups
f5069f0trac #16347: Merged with 6.3.beta4
f182d36trac #16499: Cheap speedup in the OA recursive constructions

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Jun 19, 2014

Commit: f182d36

@nathanncohen
Copy link
Mannequin Author

nathanncohen mannequin commented Jun 19, 2014

Dependencies: #16347

@videlec
Copy link
Contributor

videlec commented Jun 25, 2014

comment:5

Needs non-trivial rebase over #16347.

@nathanncohen
Copy link
Mannequin Author

nathanncohen mannequin commented Jun 25, 2014

comment:6

Rebased !

Nathann

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Jun 25, 2014

Changed commit from f182d36 to 934014c

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Jun 25, 2014

Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:

03c1f45trac #16430: Small speedup for OA(None,p^c)
8e8a9f3trac #16430: Merged with 6.3.beta4
162b83ctrac #16430: Many bugfixes
3e01acbtrac #16430: micro improvements
81b9448trac #16430: put back the seealso
0fa89d5trac #16347: Wilson's construction with two truncated groups
828ff22trac #16437: cut the branches in W. dec. with two trunc. blocks
8ebd21btrac #16347: use is_sum_of_squares_pyx instead of two_squares
0175134trac #16347: doc + simplifications
934014ctrac #16499: Cheap speedup in the OA recursive constructions

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Jun 25, 2014

Changed commit from 934014c to ee77d8e

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Jun 25, 2014

Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:

ee77d8etrac #16499: Cheap speedup in the OA recursive constructions

@videlec
Copy link
Contributor

videlec commented Jun 25, 2014

comment:9

Hi Nathann,

I propose to

sage: from sage.combinat.designs.latin_squares import MOLS_table
sage: from time import time
sage: t0 = time(); MOLS_table(30); t1 = time()
...
sage: print t1 - t0
3.6996819973

Impressive!

Vincent

@nathanncohen
Copy link
Mannequin Author

nathanncohen mannequin commented Jun 25, 2014

comment:10

Yo !

I will do this as soon as #16423 is reviewed.

  • remove the # long time for the MOLS_table test
  • change 15 to 20 or 30 in the MOLS_table

No need. We will have to set it back the way it is now as soon as #16500 is reviewed, unless there is a way to save time there.

Timings are now

sage: from sage.combinat.designs.latin_squares import MOLS_table
sage: from time import time
sage: t0 = time(); MOLS_table(30); t1 = time()
...
sage: print t1 - t0
3.6996819973

Impressive!

Too bad it will not last :-/

Nathann

@nathanncohen
Copy link
Mannequin Author

nathanncohen mannequin commented Jun 25, 2014

Changed dependencies from #16347 to #16423

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Jun 25, 2014

Changed commit from ee77d8e to b329351

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Jun 25, 2014

Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:

9ff5062trac #16423: Table of MOLS from the handbook and comparison with Sage
e64be98trac #16423: tiny code improvement and alignment
e948cf6trac #16423: Aligning the alignment
0a7d853trac #16423: Broken doctests
b329351trac #16499: Cheap speedup in the OA recursive constructions

@videlec
Copy link
Contributor

videlec commented Jun 25, 2014

comment:13

Good to me!

Vincent

@videlec
Copy link
Contributor

videlec commented Jun 25, 2014

Reviewer: Vincent Delecroix

@vbraun
Copy link
Member

vbraun commented Jun 26, 2014

Changed branch from u/ncohen/16499 to b329351

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants