Need to find a faster alternative to python's dict(zip(list1,list2))
I'm using dict(zip(list1,list2)) in a script for random forest classification which creates a dictionary from two lists. This takes about 0.002 seconds per execution. However its too slow for bulk prediction(when it needs to be executed 80K+ times)
for inp in listOfInputs[:]:
pp = clf.predict_proba(inp)[0] # clf is the classifier
probaDict = dict(zip(clf.classes_,pp))
This loop takes 0.6 seconds if len(listOfInputs)=290 which is slow. I need an efficient alternative for use with large bulk inputs for which len(listOfInputs)=80,000+