>
>
> So with the C interface it is 898 microseconds, which to me still 
> seems like a lot, given that I feel like I could write something in 
> Cython that does the same thing in about 10 microseconds. 
>
>
Which is why things like Rcpp exist.

This is sort of like timeit in R:

> v <- c(1:1000)
> system.time(replicate(100,summary(v)))
   user  system elapsed 
  0.058   0.001   0.060 
> system.time(replicate(1000,summary(v)))
   user  system elapsed 
  0.565   0.002   0.567 
> system.time(replicate(1000000,summary(v)))
^C
Timing stopped at: 4.306 0.009 4.315 
> system.time(replicate(10000,summary(v)))
   user  system elapsed 
  5.655   0.003   5.658 

So a half a millisecond even here.

-- 
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