Op donderdag 8 november 2012 10:36:51 UTC+1 schreef John Cremona het 
volgende:
>
> Either I am doing something wrong or a simple operation which should 
> be fast is in fact very slow, but I do not know why. 
>
> If V,W are vector spaces over QQ, subspaces of  the same ambient 
> space, then V.sum(W) should return their sum, with an echelon basis 
> obtained from the bases of V and W.  But this takes a stupidly long 
> time.  For example: 
>
> sage: Q100=QQ^100 
> sage: V=Q100.subspace([Q100.random_element()]) 
> sage: W=Q100.subspace([Q100.random_element()]) 
>
> # so V,W are both 1-dimensional 
>
> sage: V.sum(W) 
> sage: time V.sum(W) 
>
> # takes forever (on 5.3) -- why? 
>
> It's even slow for

sage: Q100 = QQ^1

To find out where things are slow, you can use %prun, which gives a list of 
functions and the time spent in each. I haven't had time to look into it 
yet, but perhaps you'll be able to find out what's going that way.

You could also apply patch #5814 and use %prun from the notebook.

Best, Timo

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


Reply via email to