2 ms·
I copied the initial/naive code presented and discovered that the compiler has clearly gained a few smarts in the last 3 years as it no longer bothers generatin
by Twirrim 2y ago
I copied the initial/naive code presented and discovered that the compiler has clearly gained a few smarts in the last 3 years as it no longer bothers generating the fractal, unless you actually save to disk.
If you want to skip saving the image, you can use std::hint::black_box to give a hint to the compiler to be pessimistic:
let img = std::hint::black_box(algo(w, h));