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

Little fixes for a major speedup of join/meet matrices for FiniteLatticePoset #12476

Closed
hivert opened this issue Feb 8, 2012 · 16 comments
Closed

Comments

@hivert
Copy link

hivert commented Feb 8, 2012

Before

sage: %time posets.BooleanLattice(8)
CPU times: user 10.42 s, sys: 0.01 s, total: 10.43 s
Wall time: 10.51 s
Finite lattice containing 256 elements

After

sage: %time posets.BooleanLattice(8)
CPU times: user 0.75 s, sys: 0.01 s, total: 0.76 s
Wall time: 0.84 s
Finite lattice containing 256 elements

Apply: attachment: trac_12476-lattice_join_matrix_speedup-fh.2.patch

Depends on #10998

Component: combinatorics

Keywords: poset, matrix, Cernay2012

Author: Florent Hivert, Nathann Cohen

Reviewer: Florent Hivert, Nicolas M. Thiéry

Merged: sage-5.0.beta6

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

@nathanncohen
Copy link
Mannequin

nathanncohen mannequin commented Feb 8, 2012

comment:1

Helloooooooooooo !!!

I added two modifications (which did not appear to make much of a difference) but also make the code slightly easier to read. There already was a reference, I added another, no one is hurt :-)

If you are ok with this second set of modifications you can set the ticket to "positive_review".

Nathann

@nathanncohen nathanncohen mannequin added the s: needs review label Feb 8, 2012
@nthiery
Copy link
Contributor

nthiery commented Feb 9, 2012

Reviewer: Florent Hivert, Nicolas M. Thiéry

@nthiery
Copy link
Contributor

nthiery commented Feb 9, 2012

comment:2

I folded the reviewer's patch in the original patch.
All test pass and the new code is semantically equivalent, but way faster.
Positive review! Thanks!

@nthiery nthiery changed the title Join matrix is unreasonably slow Little fixes for a major speedup of join/meet matrices for FiniteLatticePoset Feb 9, 2012
@nthiery

This comment has been minimized.

@nthiery
Copy link
Contributor

nthiery commented Feb 9, 2012

Dependencies: #10988

@hivert
Copy link
Author

hivert commented Feb 10, 2012

comment:4

There is a little problems with duplicated references in meet_matrix and join_matrix.

@hivert
Copy link
Author

hivert commented Feb 10, 2012

@hivert
Copy link
Author

hivert commented Feb 10, 2012

comment:5

Replying to @hivert:

There is a little problems with duplicated references in meet_matrix and join_matrix.

Fixed.

@hivert

This comment has been minimized.

@nathanncohen
Copy link
Mannequin

nathanncohen mannequin commented Feb 10, 2012

comment:6

Nice catch ! There's no warning anymore when I generate the doc, so I guess the new patch can go too :-)

Nathann

@jdemeyer
Copy link

comment:7

How is this related to #10988 ???

@nthiery
Copy link
Contributor

nthiery commented Feb 14, 2012

comment:8

Replying to @jdemeyer:

How is this related to #10988 ???

#10988 refactors a lot all the poset code; so we did not even try if this one would, by plain piece of luck, commute with it. Since #10988 is now in Sage (thanks btw!), does this have any importance?

@jdemeyer
Copy link

Changed dependencies from #10988 to #10998

@jdemeyer
Copy link

comment:9

I guess you mean #10998 then...

@nthiery
Copy link
Contributor

nthiery commented Feb 14, 2012

comment:10

Replying to @jdemeyer:

I guess you mean #10998 then...

Oh, yes, sorry!!!

A dependence upon #10988 would indeed be pretty scary :-)

@jdemeyer
Copy link

Merged: sage-5.0.beta6

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

3 participants