Is switching to C an adequate approach to get the combinations faster than in Python or am I on a wrong track? I only "speak" python and hope for some guidance to decide on the next programming steps for my self-chosen learning project. I am working on a Data Science project and based on your answers, I would recommend to invite a computer scientist to the project or drop my project approach.
I have a list of 69 strings where I need all possible combinations of 8 elements. At the moment I can do this in python with itertools.combinations()
for i in itertools.combinations(DictAthleteObjects.keys()),8):
do stuff here on instances of classes
In Python the itertools.combinations works perfectly fine for a view combinations but due to the large amount of combinations it is not time efficient and sometimes crashes (I think because of too less memory) when not breaking the loop after a view iterations. Generally the time-complexity is very large.
According to this StackOverflow discussion it could be a valid approach to generate the combinations in C and also do all the programming that works in python in C, because its much faster.
On the other hand I have received a comment that itertools.combinations is using C itself. But I cannot find any sources on that.