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
But a benchmark on whether this makes the code slower or not should be made.
The benchmark can be done using the current implementation of:
functionnext_collision(
p::AbstractParticle{T}, bt::Vector{<:Obstacle{T}})::Tuple{T,Int}where {T}
tmin::T=T(Inf)
ind::Int=0for i ineachindex(bt)
tcol::T=collisiontime(p, bt[i])
# Set minimum time:if tcol < tmin
tmin = tcol
ind = i
endend#obstacle loopreturn tmin, ind
end
the only difference is that bt is vector while bt2 is tuple.
We may not need unrolled at all, although because unrolled uses generated functions, the result specialized on the exact structure of the billiard table, which will make it suuuuuper efficient!
This could possibly increase performance.
With combination of the last answers of this discourse post: https://discourse.julialang.org/t/is-there-a-way-to-forward-getindex-for-tuples-in-a-type-stable-way/2889/20
it could lead to major improvements.
One needs to do proper benchmarking and profiling during this change!
(this issue should be solved at the same time with #51 )
The text was updated successfully, but these errors were encountered: