Results: The time needed to compute a Mandelbrot from a Linux VM configured with 4 cores at 2.6 GHz (Haswell Core i7).
# width => 1280, height => 1024 ( 1.3 million pixels ) Original 10.622 secs eval statements slow it down Imager 7.219 secs GD 3.689 secs MCE + Imager 3.331 secs MCE + GD 0.565 secs MCE + GD + C 0.139 secs # width => 3840, height => 3072 ( 11.8 million pixels ) Original 96.129 secs eval, ditto Imager 64.229 secs GD 33.190 secs MCE + Imager 29.029 secs MCE + GD 4.344 secs MCE + GD + C 0.436 secs # width => 6400, height => 5120 ( 32.8 million pixels ) Original 259.215 secs ditto Imager 178.817 secs GD 93.168 secs MCE + Imager 79.986 secs MCE + GD 12.296 secs MCE + GD + C 0.997 secs <-- fast is possible :) MCE + GD + C 1.002 secs <-- repeatable MCE + GD + C 0.989 secs <--
Update: Both MCE + GD and MCE + GD + Inline::C compute the upper half only.
Update: The writer is no longer the hold up for MCE + GD and MCE + GD + Inline::C. The logic was updated to minimize GD calls by 56x.
Update: Reduced IPC for the MCE + GD + Inline::C demonstration. Wanted to see if possible to reach below 1.0 second. Btw, the time is the unix time which includes the time to launch Perl, load modules, spawn workers, compute the Mandelbrot 6400 x 5120 (upper half only), copy/flip/copy into bottom half, write the image, and shutdown workers. It is mind-boggling.
Thank you karlgoethebier and perlmonks. Thank you also to the original author wherever you are.
Kind regards, Mario
In reply to Re^2: Refactoring: Better Variable Names For Better Understanding? [SOLVED]
by marioroy
in thread Refactoring: Better Variable Names For Better Understanding? [SOLVED]
by karlgoethebier
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |