#16116: Multiplication of dense cyclotomic matrices should be faster
-------------------------------------------------+-------------------------
Reporter: jipilab | Owner:
Type: enhancement | Status: new
Priority: major | Milestone: sage-6.4
Component: number fields | Resolution:
Keywords: cyclotomic field, matrix, | Merged in:
multiplication, benchmark, days57 | Reviewers:
Authors: | Work issues:
Report Upstream: N/A | Commit:
Branch: | Stopgaps:
Dependencies: |
-------------------------------------------------+-------------------------
Comment (by tscrim):
I should note that I get very different profiling when I reverse the
orders of the tensor product, which from the naive implementation of the
tensor product and thoughts about scalar multiplication surprises me:
{{{
sage: R = CyclotomicField(2)
sage: M = matrix.random(R, 40,40)
sage: N = matrix.random(R, 3, 3)
sage: %time K = N.tensor_product(M)
CPU times: user 337 ms, sys: 20.6 ms, total: 358 ms
Wall time: 335 ms
sage: %time K = M.tensor_product(N)
CPU times: user 3.99 s, sys: 32.5 ms, total: 4.02 s
Wall time: 3.97 s
}}}
There are quite a lot more function calls (~10x) to the
`_element_constructor_` in one ordering:
{{{
48023 for _element_constructor_
577312 function calls (577311 primitive calls) in 0.421 seconds
}}}
versus
{{{
594198 for _element_constructor_
7240514 function calls (7240513 primitive calls) in 4.992 seconds
}}}
--
Ticket URL: <http://trac.sagemath.org/ticket/16116#comment:15>
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.