[R-SIG-Finance] Performance comparison xts v. zoo
Dirk Eddelbuettel
edd at debian.org
Wed Jan 19 14:32:18 CET 2011
Hi Ryan,
On 19 January 2011 at 08:08, Sheftel, Ryan wrote:
| I am looking for a comparison of the performance speed between xts and
| zoo on time series. I remember once seeing this in a pdf document,
| perhaps a magazine article?, but after extensive google-ing I have come
| up blank.
|
| Any direction would be helpful before I reproduce the results myself.
xts is faster, period, as zoo started as more general (than just financial
time series: "ordered objects") and is still R-code only. And as Gabor just
restated, that is bound to change with some xts code expected to merge over
to zoo at some point---though we have been told that for years.
Xts on the other hand has compiled C and Fortran code for key operations
making it very fast (and generally faster than zoo), as well as powerful.
One example is the ISO8601 date parsing which can subset based on
human-readable strings such as "2011-01-18 10:00/2011-01-19 10:30" getting
you just that half-hour interval yesterday on intra-day data in an xts
object. So in short, I usually start projects with xts.
As for blazing fast, Jeff also has the 'indexing' package (as well as 'mmap')
which go even further, and both together are competitive in access time with
commercial offerings. Maybe you recall a writeup Jeff did for that? I can't
recall a xts-vs-zoo horse race but maybe I missed it.
Hope this helps, Dirk
--
Dirk Eddelbuettel | edd at debian.org | http://dirk.eddelbuettel.com
More information about the R-SIG-Finance
mailing list