Try updating your StaticArrays
. Some mixtures of versions between master and StaticArrays have very serious regressions (scalar-SVector broadcasts produced (nonstatic) Array results). Afterwards, _normalize(x::SVector)= @fastmath x * ( one(eltype(x)) / sqrt(sum(x.*x)) )
runs nice enough (or _normalize(x::SVector)=x/LinearAlgebra.vecnorm(x)
).
Yeah the guys from StaticArrays
just released a version last night that solves all of this. Updated now and its fast as lightning!