Closed stephematician closed 1 month ago
Regarding template vs virtual overheads with data; there's not a lot of time spent accessing the data in the current implementation. See attached profiler results. It's hard to see where further significant gains could be made.
It's possible that a tiny speed up could be obtained by moving "throw exceptions" out of inner loops (I think this helps inlining).
It should be possible to pass the data via template argument; see https://github.com/imbs-hl/ranger/issues/304#issue-314096751. This might marginally improve performance via removal of virtual lookup for data access.
Willing to take suggestions re: the prediction interface, as it currently uses a template return type in anticipation of requiring different return types for survival trees.
Also it might be worth switching to using RTTI in the C++ prediction wrapper.