How do I reduce the time it takes for my optimization algorithms to run? I'm looping through millions of variables and sometimes it takes me several days to get a result. Do I need a supercomputer or something? I'm running an i7 processor with 8 GB ram.
>>8641851
There are a ton of things you can do. Did you even make your program run in parallel? Your thread is probably a /g/ question though.
>>8641851
Since you did not respond, I assume you did not.
You might want to try to find some computer science friends or department resources to help you optimize your program.
The problem your facing is common in scientific computing and is often caused because a parameter sweep/search is needed.
>>8641883
w-what if i don't have any friends?
>>8641851
You don't need a supercomputer because you PC runs like a Supercomputer.
use a better algorithm
>>8641851
What optimization problem are you trying to solve? What algorithm are you using to solve it? What language are you running it on? All important questions. You can speed up an algorithm by up to several orders of magnitude in some cases if you do it right.
>>8641858
Not OP, but do you mean using a state machine?
>>8641851
What algorithm? How are we gonna help you when you dont even say what you are trying to do. Fucking retard! What is the time complexity of the algorithm? You have probably written some kind of O(n^4) algorithm or worse. Fucking idiot
>>8642266
kek
>>8642088
I just meant that if OP did not create the program to take advantage of multi-cores, then that would be a very easy enhancement.
For loops are a very easy target for speeding up processing time (i.e. "embarrassingly parallel").
Even if OP wanted to run it on a cluster or super computer, they would need to optimize their code to run in parallel (e.g. chunking the work into divisible units that could be spread across worker nodes).
>>8641958
>w-what if i don't have any friends?
That sucks. Maybe hire someone on reddit or from a freelance website (e.g. https://www.upwork.com).
Alot of universities offer free/paid services to help with parallelizing and optimizing code.
I would look into available clusters and supercomputer resources on your campus.
I think there are some in California that are available to grad researchers, but you have to apply and sign up.
It would really help if you had a friend though. The sad news is that you probably are going to have to train yourself to get good at these types of things.
I know soooo many scientists that were deeply shocked/disappointed that they had to learn so much computer science stuff in grad school. The good side is that I also know alot of data scientists that only were able to get the job because they had to learn so much computer science stuff in grad school.
tldr; No CS friends? Become the CS guru.
>>8642266
Woah. Settle down there. Probably the time complexity is much, much worse.
Not everything breaks down beautifully into CS 101 homework problems.