On Wed, Jun 14, 2023 at 10:15 AM David Roe <roed.m...@gmail.com> wrote:
>
> The problem is that Sage doesn't have a specialized type for integers mod N:
> sage: type(M3)
> <class 'sage.matrix.matrix_generic_dense.Matrix_generic_dense'>


More precisely, Sage doesn't have a specialized type for matrices over
integers mod N, for N *large*.  For smaller N it does, e.g.,

sage: p=next_prime(2**22)
sage: M3=Matrix(GF(p),n,na,l)
sage: type(M3)
<class 'sage.matrix.matrix_modn_dense_double.Matrix_modn_dense_double'>
sage: time a=M3**n
CPU times: user 96.5 ms, sys: 0 ns, total: 96.5 ms Wall time: 112 ms

It's obviously very important to be aware of the range of the rings
where matrices are extremely fast, if you're implementing a
multi-modular algorithm. I don't know what your application is though.

-- 
William (http://wstein.org)

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-devel/CACLE5GDP9kta1P7%3Db9vhPCC33vcFE34ns%2B5SjkUFapDZyj4u0w%40mail.gmail.com.

Reply via email to