Instead of focusing on the language, you should focus on the libraries available to you.
You should not write your own graph library if you already have a lot (read, "too many"), both in C ++ and Python . [Qaru has a list of Python Graph packages with recommendations that you should check. I did not find an equivalent question for C ++. You can run it.] In addition, if this is not an academic exercise or research on really new graph algorithms, you should look at the available libraries to see if they really already implement these algorithms of interest to you.
Using libraries mitigates the growth of a higher-level language in Python, since you will not be working with raw C ++ as such, but using the C ++ library. Since Python has a very small kernel, it is fairly easy to learn, but it still takes time. You will need the factor in extra time when you study the library if you choose the Python route, so be sure to weigh this in your solution.
Thus, given that you already know C ++, you may ultimately find it faster in C ++, since you only need to set aside the time needed to learn the library, not the library, as well as the new language, and also easy to learn language.
source share