What is your program doing? Maybe there is a simpler solution.
It is a chatbot that uses the Levenshtein algorithm to calculate the edit distance between the user's input and thousands of pattern.
I now have 23,569 patterns the number grows every day.
I want to break the pattern list up between 10 cores and pass the user input to each of the workers.
Each work will return the closest pattern and distance to the users input.
To do this it has to execute the Levenshtein Algorithm on the UserInput and each pattern keeping the pattern that has the shortest distance from the user input and returning it once it has calculated the distance for all patterns.
When all ten have returned I will have program execute the code template that corresponds to the closest pattern returned.
Right now the language I am using does not have capability for MicroServices. And my response times using a single core has reached as high a 40 seconds but shorter user inputs are still in the 2 to 3 second range.