Before doing the performance optimization, I changed the script to use
StableRNGs.jl so that the result will be stable across runs to make the
performance comparison fair. To avoid print excessively, I added the verbose
option. Also, I added save_current_best to avoid generating too many
intermediate PNGs. Finally, I compared both bestGenomes.txt, and the optimized
output matches with the unoptimized output. Thus, the optimization is valid.
This PR speeds up the script by about 70x.
Before doing the performance optimization, I changed the script to use StableRNGs.jl so that the result will be stable across runs to make the performance comparison fair. To avoid print excessively, I added the
verbose
option. Also, I addedsave_current_best
to avoid generating too many intermediate PNGs. Finally, I compared bothbestGenomes.txt
, and the optimized output matches with the unoptimized output. Thus, the optimization is valid.Before:
Now: