Salut,

> Quick summary of our discussion with the GAP developers in Aachen:
>
> They suggested the following benchmark, which is fairly typical of the
> use cases around Coxeter groups and the like:
>
>     sage: W = gap3.ComplexReflectionGroup(14)
>     sage: UC = W.UnipotentCharacters()
>     sage: time M =matrix(UC.families[2].fourierMat.sage())
>     CPU times: user 7.32 s, sys: 0.01 s, total: 7.33 s
>     sage: time M^2
>     CPU times: user 132.48 s, sys: 1.07 s, total: 133.55 s
>     Wall time: 133.69 s
>     54 x 54 densematrixoverUniversalCyclotomicFieldendowed with the Zumbroich 
> basis
>     sage: M^2.is_one()
>     True
>
> The result is correct and should make for a fairly strong check :-)

after many improvements on the cyclotomics, I did those tests again,
here are the results (so we have them for the records). Also, I want
to emphasize that M^2 is NOT one, but the results in sage and gap
coincide:

sage: W = gap3.ComplexReflectionGroup(14)
sage: UC = W.UnipotentCharacters()

Test 1:

sage: time M =matrix(UC.families[2].fourierMat.sage())
CPU times: user 1.91 s, sys: 0.01 s, total: 1.92 s
Wall time: 2.08 s

Test 2:

sage: time M^2
CPU times: user 34.25 s, sys: 0.06 s, total: 34.31 s
Wall time: 34.37 s
54 x 54 dense matrix over Universal Cyclotomic Field endowed with the
Zumbroich basis

Test 3:

sage: time UCF._matrix_mult(M,M)
CPU times: user 9.87 s, sys: 0.00 s, total: 9.87 s
Wall time: 9.88 s
54 x 54 dense matrix over Universal Cyclotomic Field endowed with the
Zumbroich basis

Test 4:

sage: %time UCF._matrix_mult(M,M,order=24)
CPU times: user 8.01 s, sys: 0.05 s, total: 8.06 s
Wall time: 8.08 s
54 x 54 dense matrix over Universal Cyclotomic Field endowed with the
Zumbroich basis

The time improvements in parts 1 and 2 come from multiple changes:
the caches are much better now, the computation of inverses are
improved, and also the cython code is much better -- with the later,
there can still be done a lot, we started discussing that at sage days
30... The difference between 2 and 3 comes only from computing an
entry in the resulting matrix directly in one step. 3 and 4 differ in
the way that we give the information that the only field order
involved in 24.

 Here is the same multiplication over CyclotomicField(24) in sage (for
which matrices are implemented in a totally different way):

sage: CF = CyclotomicField(24)
sage: asdf = matrix(CF,54,[ M[i,j].to_cyclotomic_field() for i in
range(54) for j in range(54) ] )
sage: %time asdf^2
CPU times: user 0.04 s, sys: 0.00 s, total: 0.04 s
Wall time: 0.04 s
54 x 54 dense matrix over Cyclotomic Field of order 24 and degree 8

So, there is still quite something to do...

Best, Christian

-- 
You received this message because you are subscribed to the Google Groups 
"sage-combinat-devel" group.
To post to this group, send email to sage-combinat-devel@googlegroups.com.
To unsubscribe from this group, send email to 
sage-combinat-devel+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sage-combinat-devel?hl=en.

Reply via email to