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
function Base.round(X::AbstractArray{Float32},nsb::Integer)
@inbounds is missing in these loops which shaves off about 2x of benchmarks
julia>@btimeround(A,5);
11.977 ms (2 allocations:38.15 MiB)
julia>@btimeround2(A,5);
5.447 ms (2 allocations:38.15 MiB)
with round2 being
functionround2(X::AbstractArray{Float32},nsb::Integer)
semask =setmask32(nsb)
s =shift32(nsb)
shmask =~mask32(nsb)
Y =similar(X) # preallocate@inboundsfor i ineachindex(X)
Y[i] =round(X[i],semask,s,shmask)
endreturn Y
end
The text was updated successfully, but these errors were encountered:
BitInformation.jl/src/round.jl
Line 48 in b335571
@inbounds is missing in these loops which shaves off about 2x of benchmarks
with
round2
beingThe text was updated successfully, but these errors were encountered: