Open rainwoodman opened 7 years ago
I'd love to get rid of the c++ compilation @rainwoodman - The only place where any cpp-specific feature is used is in the pairwise distance engines: pairwise_distance_3d_engine
, pairwise_distance_xy_z_engine
and conditional_pairwise_distances
. In particular, these functions use libcpp.vector
. I have not looked into how much the algorithm would need to change if this dependence were dropped - @duncandc could you comment to that effect?
I agree that it would be ideal to get rid of the C++ dependency. Let me take a look at those functions to see if we can get around using the libcpp.vector
library without any significant penalty.
Sorry I didn't realize it is using libcpp.vector.
On Tue, Nov 14, 2017 at 9:18 AM, Duncan Campbell notifications@github.com wrote:
I agree that it would be ideal to get rid of the C++ dependency. Let me take a look at those functions to see if we can get around using the libcpp.vector library without any significant penalty.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/astropy/halotools/issues/828#issuecomment-344331525, or mute the thread https://github.com/notifications/unsubscribe-auth/AAIbTFllVINt_2uFwX-PFRnT9uz5wMemks5s2ct6gaJpZM4Qczog .
Those three functions are the only ones using libcpp.vector in the entire repo @rainwoodman - if you know of common workarounds for this, I would happily use those instead. These three functions do not need to be ultra-high performance.
If there is a reasonably sized upper bound, can you simply allocate according to the bound and update a size
variable?
incremental growth of around 1.5x with realloc()
is not very hard too, you only need to keep size and maxsize.
It appears that halotools doesn't really need c++. If that's the case, using C makes life of downstream packaging a lot easier.