Answer the question
In order to leave comments, you need to log in
Should I run C++ from Python?
there is a function that receives point A and a list of points, calculates the Euclidean distance from point A to all points in the array
of points A is many and the array of points is very large, so here I have a bottleneck
, everything is complicated by the fact that the point is a dictionary that represents a multidimensional space (1.0 - 2k) and at point A many spaces may not be defined
transferring a dictionary to a sheet is not desirable
Is it worth making this function in C ++?
after a little searching, I realized that it is not so simple
. If it is, then what is preferable?
in Boost.Python I never found what to download, there is a ton of binaries
PyCXX is preferable, but it doesn’t compile,
otherwise what is poorly described in the standard library
If I make this function in C++ will the memory consumption increase?
Answer the question
In order to leave comments, you need to log in
There are options:
- use PyPy . JIT. speeds up code execution.
- NumPy is a library for scientific computing.
- Cython - A superset of python for easy writing extensions.
If so, what is preferable?
If I make this function in C++ will the memory consumption increase?
Write a library in C with the desired function. Memory consumption will increase by the size of the resulting library, but I understand that you mainly need speed. As an option, write in Cython, in this case it will be almost the same as with hands in C.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question