-
Notifications
You must be signed in to change notification settings - Fork 5
Open
Labels
enhancementNew feature or requestNew feature or request
Description
There is a slow down happening because of the eraise and cumsum in CellLinked process.
# inside neighborsCellLinked
community.abm.neighbors.cellNumAgents_ .= 0
$namef($(base...),)
# community.abm.neighbors.cellCumSum_ .= cumsum(community.abm.neighbors.cellNumAgents_) .- community.abm.neighbors.cellNumAgents_
begin
cumsum!(community.abm.neighbors.cellCumSum_, community.abm.neighbors.cellNumAgents_)
community.abm.neighbors.cellCumSum_ .-= community.abm.neighbors.cellNumAgents_
end
$namef2($(base...),)
By computing cumsum inplace, I have reduced the memory overhead, but some additional speed up could be performed.
Maybe declaring a vector storing the grid points with cells to just clean those positions? It will require more memory but may speed up the cleaning process?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request