David Bellot
2017-07-11 22:44:16 UTC
Hi,
it looks like I couldn't find a proper solution, even after googling every
where. The question is simple:
I have a bit64 vector of integers (timestamps of financial tick data, you
bet ?) and I want to pass it to a C++ function. The good ol' method is to
convert it to strings, pass it and cast strings back to 64 bits integers in
C++. And vice and versa when I pass my result back. But the size of my
vectors are in the range of millions of items, so the method is just a bit
slow.
Since Rcpp 0.9.8, there is no more support for the LongVector class. Papers
like http://www.sciencedirect.com/science/article/pii/S0098300416307415,
despite very interesting, were not very useful to solve my simple problem,
so I was wondering if there is a better solution ?
reinterpret_cast ?
GenericVector or RawVector ?
Anything so obvious that I just missed it ?
And of course, same questions in the other direction: how to return my
vector back to R and have a bit64 at the end ?
Thanks for your help,
David
it looks like I couldn't find a proper solution, even after googling every
where. The question is simple:
I have a bit64 vector of integers (timestamps of financial tick data, you
bet ?) and I want to pass it to a C++ function. The good ol' method is to
convert it to strings, pass it and cast strings back to 64 bits integers in
C++. And vice and versa when I pass my result back. But the size of my
vectors are in the range of millions of items, so the method is just a bit
slow.
Since Rcpp 0.9.8, there is no more support for the LongVector class. Papers
like http://www.sciencedirect.com/science/article/pii/S0098300416307415,
despite very interesting, were not very useful to solve my simple problem,
so I was wondering if there is a better solution ?
reinterpret_cast ?
GenericVector or RawVector ?
Anything so obvious that I just missed it ?
And of course, same questions in the other direction: how to return my
vector back to R and have a bit64 at the end ?
Thanks for your help,
David