I downloaded 2 versions of Mandelbrot:
Mandelbron_master and Mandelbrot_bands.
On all my computers they give me strange results.
For example, on my Desktop (windows 10) , Generate 10000x8000 size png file
Mandelbron_master (release version) : 4.75s (real time)
Mandelbrot_bands. (release version): 6s (real time)
Mandelbrot_bands, modify to 1 thread, release version: 23s (real time)
The results surprised me! Ignore the 2 strange results (4.74s and 6s), how can the final version be so slow! 23s!
The simple version Mandelbron_master gives me the best result! Andbody tells me what happened?
Its easier when you send the whole cargo project. I tried running your code but it complained about image::png not existing and image::ColorType::Gray not beeing a thing. If I had your Cargo.toml I wouldn't have that issue.
Yes... I generate 10000x8000 size pictures.
Mandelbrot_master is a baseline. something like 5 secs
Mandelbrot_bands_8_thread is multi-thread version, should be much faster. But it's 6 secs
Mandelbrot_bands_1_thread is single-thread version. Why it is so slow, 23secs!
Those aren't particularly surprising results. Mandelbrot_master uses rayon, which is a well optimised and standard crate for these sorts of CPU-bound parallel computations. Mandelbrot_bands_8_thread implements its own parallelism, but ends up being only a little slower than the rayon version. Mandelbrot_bands_1_thread only uses one thread, so it is not surprising that it takes longer than the multi-threaded versions (although it doesn't take 8 times as long, presumably due to the overhead of launching threads).
Edit to add: According to its FAQrayon by default uses as many threads as there are CPU cores, so it is probably using the same number of threads as the Mandelbrot_bands_8_thread version, further explaining their similar times.