1
General / Noise when using threads
« on: February 01, 2020, 11:21:10 am »
Hello
I am creating a fractal exploration program. Such tasks require a lot of computational power. During my first tests I managed to reach ~15% of processor load, very poor FPS and couldn't force it to work faster. Some people reccomended trying multithreading my program. So I did it. But then a weird thing happens. Depending on the PC the program is running at, I sometimes get terrible image noise as shown in noise.png. But on other PCs everything is ok and processor reaches 90% usage.
Entire code is in main.cpp and free to use/copy.
So here are my queries:
1. Is this caused by the way I manage threads?
2. Is there a better way to display fractals than by using sf::Image?
3. Any other performance/general tips?
I am creating a fractal exploration program. Such tasks require a lot of computational power. During my first tests I managed to reach ~15% of processor load, very poor FPS and couldn't force it to work faster. Some people reccomended trying multithreading my program. So I did it. But then a weird thing happens. Depending on the PC the program is running at, I sometimes get terrible image noise as shown in noise.png. But on other PCs everything is ok and processor reaches 90% usage.
Entire code is in main.cpp and free to use/copy.
So here are my queries:
1. Is this caused by the way I manage threads?
2. Is there a better way to display fractals than by using sf::Image?
3. Any other performance/general tips?