Skip to content

Commit a7d9bf6

Browse files
reduce compile times
1 parent e0567b6 commit a7d9bf6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/utils.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ function recursivecopy(a::AbstractArray{T,N}) where {T<:Number,N}
1515
end
1616

1717
function recursivecopy(a::AbstractArray{T,N}) where {T<:AbstractArray,N}
18-
[recursivecopy(x) for x in a]
18+
map(recursivecopy,a)
1919
end
2020

2121
function recursivecopy!(b::AbstractArray{T,N},a::AbstractArray{T2,N}) where {T<:StaticArray,T2<:StaticArray,N}
@@ -62,7 +62,7 @@ function vecvecapply(f,v::T) where T<:Number
6262
f(v)
6363
end
6464

65-
@inline function copyat_or_push!(a::AbstractVector{T},i::Int,x,nc::Type{Val{perform_copy}}=Val{true}) where {T,perform_copy}
65+
function copyat_or_push!(a::AbstractVector{T},i::Int,x,nc::Type{Val{perform_copy}}=Val{true}) where {T,perform_copy}
6666
@inbounds if length(a) >= i
6767
if T <: Number || T <: SArray || (T <: FieldVector && !is_mutable_type(T)) || !perform_copy
6868
# TODO: Check for `setindex!`` if T <: StaticArray and use `copy!(b[i],a[i])`

0 commit comments

Comments
 (0)