It's unbelievable.  With v=T[0], all of these take a ridiculous time:
sage: V2=v.parent()
sage: VQ=V2.change_ring(QQ)
sage: vQ=VQ(v)
In my code I have had to avoid using change_ring on vectors and
matrices for this.

On 25 November 2013 20:07, Jeroen Demeyer <[email protected]> wrote:
> Why does this take such a long time?
>
> sage: M = random_matrix(ZZ,2000,1000)
> sage: T = M.change_ring(GF(2)).left_kernel().basis()
> sage: %time r = T[0].change_ring(QQ)
> CPU times: user 73.49 s, sys: 0.33 s, total: 73.83 s
> Wall time: 74.01 s
>
> Especially compared to
> sage: %time r2 = Matrix(T).change_ring(QQ).rows()[0]
> CPU times: user 7.40 s, sys: 0.01 s, total: 7.41 s
> Wall time: 7.40 s
>
> Or even
> sage: %time r3 = vector(QQ, T[0].list())
> CPU times: user 0.01 s, sys: 0.00 s, total: 0.01 s
> Wall time: 0.01 s
>
> --
> 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 [email protected].
> To post to this group, send email to [email protected].
> Visit this group at http://groups.google.com/group/sage-devel.
> For more options, visit https://groups.google.com/groups/opt_out.

-- 
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 [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to