#19341: Cleaning/Fix in combinat/matrices/hadamard_matrix
-------------------------------------+-------------------------------------
Reporter: ncohen | Owner:
Type: enhancement | Status: needs_review
Priority: major | Milestone: sage-6.9
Component: combinatorial | Resolution:
designs | Merged in:
Keywords: | Reviewers: Dima Pasechnik
Authors: Nathann Cohen | Work issues:
Report Upstream: N/A | Commit:
Branch: u/ncohen/19341 | 11590100b6520e833cf8de16732d85407d836214
Dependencies: #19340 | Stopgaps:
-------------------------------------+-------------------------------------
Comment (by dimpase):
by the way, `bool` is only a smaller part of the slowness:
{{{
sage: timeit('matrix(ZZ, [[1 if (x-y).is_square() else -1 for x in K_list]
for y in K_list])')
25 loops, best of 3: 27.9 ms per loop
sage: timeit('matrix(ZZ, [[2*((x-y).is_square()-5) for x in K_list] for y
in K_list])')
5 loops, best of 3: 57.1 ms per loop
sage: timeit('matrix(ZZ, [[2*((x-y).is_square()-.5) for x in K_list] for y
in K_list])')
5 loops, best of 3: 265 ms per loop
}}}
appearance of `float` causes most of the slowness.
--
Ticket URL: <http://trac.sagemath.org/ticket/19341#comment:14>
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.