Performance bottleneck
jakobbossek opened this issue · 3 comments
Just identified the main performance bottleneck responsable for linearly growing generation time.
Until now I assumed the update of the opt.path
to be responsable for that. However, in my little test case ((10+10) EA for 10000 generations) the opt.path
update consumes only 30 secs of on average 210 secs of runtime. The entire offspring generation and selection takes 80 secs.
Finally checking the stopping condition takes about 100 seconds. This is due to the naive searching for the max iteration in the opt.path
. Sure, I can write this stopping condition more intelligently, but in general stopping conditions might be the major bottleneck.
Solved this in the following way: introduced opt.state
object with optional opt.path
. All default stopping conditions extract information from the current opt.state. This way by default we have no linearly increasing generation time. For the upper example execution time reduced from > 200 seconds to 30 seconds.
Big fat commit is coming soon 👍
Done. opt.path
is optional from now on.