Optimized by adding fitness cache