필터 지우기
필터 지우기

specific reason(s) why ga with UseParallel=true is faster than expected

조회 수: 1 (최근 30일)
Herbert Triceratops
Herbert Triceratops 2021년 12월 1일
댓글: Herbert Triceratops 2021년 12월 1일
If the fitness function requires T time to execute once, the population size is P, and the number of workers is W, then a very rough/naive estimate for the time that ga requires to process one generation is T*P/W.
However, in circumstances where the per-worker overhead is minimal, the time per generation is slightly lower than the naive estimate, despite the fact that the naive estimate doesn't even include costs like selection, mutation, crossover, etc.
What is the specific, mechanical reason for this? I can make conjectures, but a real answer is better.
Possibly related to this is the curious fact that there is a very large gap of time between when ga is executed and when the fitness function is executed for the first time. Are the two questions related because MATLAB doing some kind of JIT compilation of the fitness function?
Thanks!
  댓글 수: 2
Matt J
Matt J 2021년 12월 1일
My guess would be that the execution time of your fitness function is not the same for all population members. Your estimate of T is higher than the average execution time, in other words.
Herbert Triceratops
Herbert Triceratops 2021년 12월 1일
That's a reasonable guess, but the fitness function that I am using to understand this phenomenon better is actually doing totally pseudorandom work of a constant size. Also, I am calculating T by averaging over many executions of the fitness function, and the inequality that I mention is true for 100% of the generations that I perform. So, ultimately, I don't believe what I am observing is due to luck.

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

Help CenterFile Exchange에서 Least Squares에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by