It is advised in the performance section of the documentation that container type should not be AbstractType for better performance. I wonder what is the correct way to declare container partition, data
in the following pseudocode and if these proper declaration will boost my performance. Note that I do know and control the output type of computeEquivalenceClass, computeAdditionalDatum
.
baseSet = collect(1:10e10)
partition = [] # Array{Any}
data = [] # Array{Any}
while !isempty(baseSet)
class = computeEquivalenceClass()
datum = computeAdditionalDatum()
push!(partition, class)
push!(data, datum)
filter!(k->!(k in class), baseSet)
end
Thank you.