Hi guys! I am coding MGEO algorithm into a Julia module. MGEO is a multiobjective evolutionary algorithm that was proposed by a researcher at my institution.
I have already a version of MGEO in C++ (https://github.com/ronisbr/mgeocpp). The problem is that Julia version is very slow compared to C++. When I tried a dummy example, it took 0.6s in C++ and 60s in Julia. After some analysis, I realized that the problem is the loop through a list. The algorithm store a list of points (the Pareto frontier) and for every iteration the algorithm must go through every point in this list comparing each one with the new candidate to be at the frontier. The problem is that, for this dummy example, the process is repeated 128,000 times and the number of points in the frontier at the end is 6,000+. Each point in the list is an instance of this type: type ParetoPoint # Design variables. vars::Array{Float64,1} # Objective functions. f::Array{Float64, 1} end I am creating the list (the Pareto frontier) as follows paretoFrontier = ParetoPoint[] and pushing new points using push!(paretoFrontier, candidatePoint) in which candidatePoint is an instance of ParetoPoint. Can anyone help me to optimize this code? Thanks, Ronan
