gives a more than six times faster execution when the population size is large as shown below. This changes the algorithm when boundary handling is applied (or when the gp attribute represents not the identity for some other reason), so whether this is the case needs to be carefully checked in each case.
Times recorded by the notebook cells and shown in the printed lines for running 20 iterations with popsize 3000:
We may also want to investigate whether the SolutionDict implementation can still be improved.
When the objective function is quick to optimize, the bottleneck is (still) the
SolutionDict
.Replacing the
SolutionDict
(which maps back the phenotypes to genotypes intell
) with an empty class likegives a more than six times faster execution when the population size is large as shown below. This changes the algorithm when boundary handling is applied (or when the
gp
attribute represents not the identity for some other reason), so whether this is the case needs to be carefully checked in each case.Times recorded by the notebook cells and shown in the printed lines for running 20 iterations with popsize 3000:
We may also want to investigate whether the
SolutionDict
implementation can still be improved.