Changes between Version 3 and Version 10 of Ticket #19161


Ignore:
Timestamp:
09/08/15 11:19:41 (6 years ago)
Author:
jmantysalo
Comment:

Replying to ncohen:

That was fast to test. Matrix-based loses by factor of 6 when going through posets of size 11.

Both are matrix based, so I do not know what you have in mind.

I meant that mine was "matrix-based", i.e. the speed come from speed of matrix operations.

Keep the one that is the fastest

Your implementation is faster.

Mélodie, can you review this? The code is now mostly from Nathann, but if it does not work, it might also be that I have made a mistake.

She has a different opinion about mining? Amazing.

;=)

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #19161

    • Property Authors changed from Jori Mäntysalo to Nathann Cohen, Jori Mäntysalo
    • Property Cc mlapointe added
    • Property Commit changed from bf8fdd5dd0702a6158691183ac6a3351461a650e to b8853ed85f14cb8b3d2a9046d31505bf81223c7d
  • Ticket #19161 – Description

    v3 v10  
    11As playing with matrices is much faster than looping over elements, this patch makes `is_complemented()` much faster.
    22
    3 Let `L10` bet the list of all lattices of 10 elements and `B10` be the Boolean lattice with `2^10` elements. Then without the patch it takes 7,76 seconds to run `len([L for L in L10 if L.is_complemented()])` and 101,84 seconds to run `B10.is_complemented()`. With the patch the time reduces to 0,38 and 0,23 seconds.
     3Let `L10` bet the list of all lattices of 10 elements and `B10` be the Boolean lattice with `2^10` elements. Then without the patch it takes 7,76 seconds to run `len([L for L in L10 if L.is_complemented()])` and 101,84 seconds to run `B10.is_complemented()`. With the patch the time for both of them reduces below one second.