use another RawVector instead of as.raw(SEXP)
new demo for (daily) SP500 data to illustrate speed gains