2009/9/16 Jason Grout <jason-s...@creativetrax.com>: > > William Stein wrote: > >> I did write a lot of stats in Cython already, and it's much faster >> than both R and scipy.stats at what it does (at least last time I >> checked). This is all the code in Sage's finance.TimeSeries... >> It's very specialized though compared to what is offered by Scipy/R. >> Anyway, the one time I seriously wanted to do a lot of stats, I >> found scipy.stats and R to both be way way too slow, so had to write >> my own in Cython. > > > Do you know how your code compared to gsl in speed?
No. > Were you talking to R via pexpect? No but it wouldn't matter. The main thing I benchmarked was computing the standard deviation of about a million (or more) numbers. I spent hours tracking down why R was much slower (at least 10 times) than what anybody could implement in 5 minutes in Cython, and it was because so far as I can tell (at the time) R's standard deviation was implemented in terms of a general n-dimensional covariance (?) function. The function was so general that it slowed down a lot compared to naive code in the special case of 1-dimensional data. I looked at numpy and it was also slower for much the same reason. This could have all changed by now, as this was about 2 years ago. I was also very interested in generating many numbers at random that are normally distributed. William > > Jason > > -- > Jason Grout > > > > > -- William Stein Associate Professor of Mathematics University of Washington http://wstein.org --~--~---------~--~----~------------~-------~--~----~ To post to this group, send an email to sage-devel@googlegroups.com To unsubscribe from this group, send an email to sage-devel-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-devel URL: http://www.sagemath.org -~----------~----~----~----~------~----~------~--~---