Why Python multithreading is not speeding things up?
#from concurrent.futures import ProcessPoolExecutor from concurrent.futures import ThreadPoolExecutor import time values = range(1,9999) def dissect1(qq): adding = sum(list1[qq:qq+100000]) averaging = adding / len(list1[qq:qq+100000]) return adding,averaging def dissect2(qq): adding = sum(list2[qq:qq+100000]) averaging = adding / len(list2[qq:qq+100000]) return adding,averaging list1 = range(0, 99999999) # Two copies to speed things up? list2 = range(0, 99999999) # Two copies […]
Why Python multiprocessing is not speeding things up?
#from concurrent.futures import ProcessPoolExecutor from concurrent.futures import ThreadPoolExecutor import time values = range(1,9999) def dissect1(qq): adding = sum(list1[qq:qq+100000]) averaging = adding / len(list1[qq:qq+100000]) return adding,averaging def dissect2(qq): adding = sum(list2[qq:qq+100000]) averaging = adding / len(list2[qq:qq+100000]) return adding,averaging list1 = range(0, 99999999) # Two copies to speed things up? list2 = range(0, 99999999) # Two copies […]