I need to parallelize some internal function calls that I have in a class in a much larger homebuilt framework. I've attempted both multiprocessing and threading (separately), and when testing the amount of time required, I noticed that execution of those functions takes longer now than it did previously.
Reading over this question and this question, I realized that the issue is probably that I'm attempting to parallelize a class member function, and that I'm running into class instance issues with the subprocesses/threads.
I could move the function outside of the class definition, passing in required data structures, however the function in question is deeply coupled to other member functions.
My question is...do I need to move all member functions outside of the class definition to realize the speedup I require, or is my understanding of the problem flawed?