Part 3. Timing (15 points)

In this part, you’ll run your code several times with different numbers of threads to determine how long it takes to generate the image.

Your task

Time how long it takes to generate the image with several different numbers of threads using the --threads option. Remember to use cargo build --release and time cargo run --release to use the optimized release build rather than the unoptimized debug build. Put the results of your timing experiment in your README.

Answer the following questions in the README.

  1. Using --threads 2, you may have noticed that the program runs much faster than when run with only a single thread but it takes more than half the time of a single thread. Why is that?
  2. At what point does increasing the number of threads stop speeding up the program?
  3. How does the number you found for question 2 compare with the available parallelism the hello program you wrote in Part 1?

At this point, you’re all done and should submit your work. Feel free to play around with the other options to jfrac like --constant, --initial-zoom, --final-zoom, --frames to produce other interesting images.