bidask icon indicating copy to clipboard operation
bidask copied to clipboard

Optimize the C++ version of edge

Open waynelapierre opened this issue 1 year ago • 2 comments

I find the current bidask::edge function quite slow. Since you already have edge coded in C++, could you port it to the R package using Rcpp? Also, some parts of the C++ edge function can be parallelized using OpenMP.

waynelapierre avatar Aug 24 '24 18:08 waynelapierre

Nice! Yes, I can try the port to R but I don't know how to parallelize the code in C++. Would you be able to help there?

eguidotti avatar Aug 24 '24 19:08 eguidotti

The C++ version will not be ported to R because the Rcpp package is licensed under GPL and I want to license the R package (and possibly all implementations) under the more permissive MIT license. See https://github.com/eguidotti/bidask/issues/15

The R and Python versions now includes the functions edge_rolling and edge_expanding that are optimized for fast calculations over rolling and expanding windows.

Yet, the C++ version can be optimized indeed. Any help is greatly appreciated!

eguidotti avatar Dec 24 '24 22:12 eguidotti