#10963: Axioms and more functorial constructions
-------------------------------------+-------------------------------------
Reporter: nthiery | Owner: stumpc5
Type: enhancement | Status: needs_review
Priority: major | Milestone: sage-6.2
Component: categories | Resolution:
Keywords: days54 | Merged in:
Authors: Nicolas M. Thiéry | Reviewers: Simon King, Frédéric
Report Upstream: N/A | Chapoton
Branch: | Work issues: To be merged
public/ticket/10963-doc- | simultaneously with #15801
distributive | Commit:
Dependencies: #11224, #8327, | fe1c1c5b6291d548c85d8565068737001675b30a
#10193, #12895, #14516, #14722, | Stopgaps:
#13589, #14471, #15069, #15094, |
#11688, #13394, #15150, #15506, |
#15757, #15759, #16244 |
-------------------------------------+-------------------------------------
Comment (by nthiery):
Replying to [comment:710 tscrim]:
> The point is that it is going through our coercion system, it has to as
they are different types; whereas the comparison of machine ints does not
(well, at least they are the same type [and w/o parents] and their
equality test is directly in the ALU -- IDK if they completely avoid the
coercion system).
Yes, an equality test between two Python integers is completely
Python's affair. Our coercion system does not interfer. I'd be scared
otherwise :-)
As for the question at hand: allright. The optimization is a bit less
relatively negligible than I thought (about 10% in the trivial branches):
{{{
sage: %timeit Category.join([])
100000 loops, best of 3: 2.43 µs per loop
sage: S = Sets()
sage: %timeit Category.join([S])
1000000 loops, best of 3: 811 ns per loop
sage: %timeit Category.join([S, S])
100000 loops, best of 3: 8.85 µs per loop
sage: G = Groups(); H = Monoids().Finite()
sage: %timeit Category.join([G,H])
100000 loops, best of 3: 9.16 µs per loop
}}}
Travis's commit made me spot that the corpse of the old _join helper
function in category.py was still lying around. Strange it feels like
the third time I removed it. There must have been some glitch when the
patches were imported into git. Anyway, gone with the wind.
----
New commits:
||[http://git.sagemath.org/sage.git/commit/?id=fe1c1c5b6291d548c85d8565068737001675b30a
fe1c1c5]||{{{Trac 10963: Removed the old _join helper function in
category.py (why was it still there???)}}}||
--
Ticket URL: <http://trac.sagemath.org/ticket/10963#comment:712>
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.