#16985: Poset: Faster is_selfdual()
-------------------------------------+-------------------------------------
Reporter: jmantysalo | Owner:
Type: enhancement | Status: new
Priority: minor | Milestone: sage-wishlist
Component: combinatorics | Resolution:
Keywords: | Merged in:
Authors: | Reviewers:
Report Upstream: N/A | Work issues:
Branch: | Commit:
u/jmantysalo/poset__faster_is_dual__|
17f1b0f71b8cb537bbe0a1dbdf7d350c0dd845b6
Dependencies: | Stopgaps:
-------------------------------------+-------------------------------------
Comment (by tscrim):
I'm not surprised by the slowdown because extra checks are being done
first. However I'd say the slowdown is acceptable in comparison to the
speedup because (I believe) most posets are not self-dual. Could you post
your before/after timings?
I'd also not use random posets but instead make sure there is a poset
which fails each check to make sure the code works (so fails the in-degree
-> out-degree comparison and the level sets comparison [but passes the
first test]).
One thing from a quick glance at the code, we're trying to be python3
compliant. So you should change `<>` into `!=`.
--
Ticket URL: <http://trac.sagemath.org/ticket/16985#comment:6>
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.