and i wouldnt begin parallelisation before I could reasonable estimate that my code would complete in reasonable finite time, if i was succesfull at doing it.
I wouldnt waste energy parallelising without trying to make the most efficient algorithm, and this would include heuristics for avoiding comparisons wherever possible. If the runtime is expected to be 1 year on 1 core, then running on 12 might mean you could have some justification to expect on the order of a month or two if you sucessfully parallelise. If the runtime is expected to be 1 day on 1 core, then you could hope that you might approach some fraction of completing in a couple of hours on 12 (even though that would be somewhat idealistic).
We should really profile your code on small example data, to estimate the current full runtime. Rather than running on 1 core, running on 12 cores could make code execute 12 times faster ( under perfect conditions that are typically not possible to acheive) The most a parellising improvemnt could give you would be a linear speed up. V1 & V2 contain all comparison that I want to do: Id_GeneNameTwoGenes = q),]
I systemed the code, I deleted the parallelization because to create n, nms, V1 & V2 pass 1 minute and 30 seconds, so good, but i don't know how to change the weight and weight2. It might take 400 seconds to loop around 20. Recommend you have a quick read around Big-O notation.īut here is a simple demo of what 4 nested loops can do to your machine. You should understand that any algorithm with such poor efficiency will die a death and parallelising wont save it. Is there anyway to make this code faster? There are four nested loop but i don't understand how to make this code in parallel. The code function, but the main problem is that the execution is slow. I used this code to compare all genes to each other.