On Tue, Sep 25, 2012 at 1:10 PM, rickhg12hs <[email protected]> wrote:
> Is there a way to use R from Sage to speed things up?  Is there something in
> Sage that could be improved to approach R's speed?
>
> E.g., here's a toy demonstration of how slow R's summary is from Sage.
>
> sage: version()
> 'Sage Version 5.3, Release Date: 2012-09-08'
> sage: %timeit  r.summary(range(1000))
> 5 loops, best of 3: 17.5 s per loop

I don't understand your questions above at all, but want to point out
that in your example the time is completely dominated by converting
the Python object "range(1000)" to R.  Consider:

sage: %timeit  r.summary(range(1000))
5 loops, best of 3: 2.2 s per loop
sage: s = r(range(1000))
sage: %timeit  r.summary(s)
125 loops, best of 3: 5.26 ms per loop

 -- William


>
>
> Regards.
>
> --
> You received this message because you are subscribed to the Google Groups
> "sage-support" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected].
> Visit this group at http://groups.google.com/group/sage-support?hl=en.
>
>



-- 
William Stein
Professor of Mathematics
University of Washington
http://wstein.org

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


Reply via email to