+ 2
Factoring numbers program
Hi everybody, I know factoring large numbers is CPU intensive, and factoring products of large primes is incredibly hard. This reason that digital encription work so well. I wrote a python program to factor njumbers, factor2a.py. give a number n, I only need to look for factors equile to or less than the squarerrot of n. this helps alot, but is there any other tricks I can do to speed up my factorng roujtine??? factor2a.py https://code.sololearn.com/c8FWx1Uu60E6/#py
2 odpowiedzi
+ 3
Thanks Tony
+ 1
Look into threading or subprocesses, so that your program can utilize more of your computer's cores. Although it complicates how you need to handle data, since you're going to need to have multiple parallel calculations on the same data. Queues and thread locks are the two ways to manage this. I'm not saying it's simple, but it's a solution.