You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It appears that the size of the array is constant across iterations. Can the allocation of the array be moved to the constructor? Allocating an array every iteration is an unnecessary expense.
The text was updated successfully, but these errors were encountered:
The benefit of allocating a new array is that it ensures there's no internal state that can become inconsistent, e.g. if iterating with @threads or if the user mutates the result.
Combinatorics.jl/src/multinomials.jl
Lines 18 to 23 in d1b633b
It appears that the size of the array is constant across iterations. Can the allocation of the array be moved to the constructor? Allocating an array every iteration is an unnecessary expense.
The text was updated successfully, but these errors were encountered: