algorithm - How do I access all computer cores for computation in python script? -


i have python script has take many permutations of large dataset, score each permutation, , retain highest scoring permutations. dataset large script takes 3 days run.

when check system resources in windows, 12% of cpu being used , 4 out of 8 cores working @ all. if put python.exe process @ highest priority, doesn't change.

my assumption dedicating more cpu usage running script make run faster, ultimate goal reduce runtime @ least half. there python module or code me this? aside, sound problem benefit smarter algorithm?

thank in advance!

there few ways go this, check out multiprocessing module. standard library module creating multiple processes, similar threads without limitations of gil.

you can excellent celery library. distrubuted task queue, , has lot of great features. pretty easy install, , easy started with.


Comments

Popular posts from this blog

monitor web browser programmatically in Android? -

Shrink a YouTube video to responsive width -

wpf - PdfWriter.GetInstance throws System.NullReferenceException -