Closed rsmb7z closed 2 months ago
I suppose this offers some advantages when called from Python to avoid a for loop?
Otherwise I'd imagine performance would be fairly close just calling from_raw_c
in a loop from Cython?
Might be good to add one test too?
I suppose this offers some advantages when called from Python to avoid a for loop?
Otherwise I'd imagine performance would be fairly close just calling
from_raw_c
in a loop from Cython?
Yes correct, by having loop in Cython and passing the Numpy view is much faster straight from Python. I did some experiment with Wranglers and could be moved to Python offering same performance as currently in Cython. I think OrderBook is pending and then we could remove Cython for Wranglers.
Also having single method, we avoid checking InstrumentId/BarType and reuse the objects on every item where we know its same which also adds up some performance increase and the reason of not calling from_raw_c
within Cython.
Pull Request
Add from_raw_arrays_to_list method for Bar.
Type of change