Skip to content

Commit

Permalink
Add de_evaluation profiling
Browse files Browse the repository at this point in the history
  • Loading branch information
soldatmat committed Feb 14, 2024
1 parent 11755d2 commit 0268e5c
Showing 1 changed file with 21 additions and 3 deletions.
24 changes: 21 additions & 3 deletions scripts/profiling.jl
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
include("de_sandbox.jl")

"""
A simple function for profiling de!().
A simple function for profiling `de!()`.
Select different DE modules (Screening, SelectionStrategy, Mutagenesis) and `initial_population`
Select different DE modules (`Screening`, `SelectionStrategy`, `Mutagenesis`) and `initial_population`
in `de_sandbox.jl` to profile different modules.
"""
function run_de(n::Int)
Expand All @@ -19,5 +19,23 @@ function run_de(n::Int)
end
end

"""
A simple function for profiling `de_evaluation()`.
Select different DE modules (`Screening`, `SelectionStrategy`, `Mutagenesis`) and `initial_population`
in `de_sandbox.jl` to profile different modules.
"""
function run_de_evaluation(n::Int)
de_evaluation(
SequenceSpace{Nothing}(initial_population),
n;
screening,
selection_strategy,
mutagenesis,
n_iterations=10,
parallel=false,
)
end

# Use your preferred profiling tool, for example:
# @profview run_de2(10000)
# @profview run_de(10000)

0 comments on commit 0268e5c

Please sign in to comment.