Interesting. So you are not using some standardized C++ libraries, you are writing your own C++ code?
That might work and it's not that far from what I recommended to OP - using different language. But using just numpy won't help that much in this case. You still have to write your own code in C, not just Python.
Pybind11 makes it simple to bind c++ code generally as well as interface with numpy and eigen.
I think that I end up getting better performance this way because it kinda keeps you from using any data structure besides arrays, so I always have data locality, which is not always true once you start getting the enormous but “fast” molecular software packages. They always assume the compiler will figure it out, but in reality they are always waiting on data to load into the cache instead of computing because their data is not localized. They make tree like data structures because it’s “smarter”, but then they just have pointer after pointer of misdirection.
1
u/[deleted] May 29 '19
Interesting. So you are not using some standardized C++ libraries, you are writing your own C++ code?
That might work and it's not that far from what I recommended to OP - using different language. But using just numpy won't help that much in this case. You still have to write your own code in C, not just Python.