Arcachofo / SimulIDE-dev

SimulIDE Circuit Simulator.
https://simulide.com
GNU Affero General Public License v3.0
53 stars 17 forks source link

will multithreading be created? #11

Open Qikelela opened 1 month ago

Qikelela commented 1 month ago

The program is not working fast enough. The program can use only 1 thread. You can try, for example, using OpenMP in for loops. I also recommend adding the -march=native flag when compiling.

Arcachofo commented 1 month ago

SimulIDE uses 2 threads, one for the GUI and other for the simulation and I don't see a case for further multithreading. If you know about a benefitial case for multithreading in Simulide please share your code.

Multithreading for loops can be faster in some cases, but it can also slow down the execution or not be possible at all. -march=native can be used when you compile for your own machine, not to distribute sofware.

Qikelela commented 1 month ago

The fact is that the program engine cannot reproduce complex schemes.

PaulaMaged commented 1 month ago

How "complex" are we talking here?

Your detailed insights will help me be aware of possible pitfalls as I begin to rely on this program and also help the developer to better pinpoint the root cause of the problem and discuss some possible alternatives/solutions for your case.

Qikelela commented 1 month ago

How "complex" are we talking here?

* What are your computer/laptop specs?

* what circuits have you tried?

* what are the indicators that make you state that it is slow?

* Have you tried to see where the bottleneck might be? MCUs I believe are harder to simulate than circuit components

Your detailed insights will help me be aware of possible pitfalls as I begin to rely on this program and also help the developer to better pinpoint the root cause of the problem and discuss some possible alternatives/solutions for your case.

Arcachofo commented 1 month ago

The fact is that the program engine cannot reproduce complex schemes.

Obviously there always will be circuits that will not run at real time, no matter how fast is the simulation engine. But multithreading is not a solution in this case.