Open kaipartmann opened 1 week ago
There are differences in performance (see https://github.com/kaipartmann/Peridynamics.jl/pull/107#issuecomment-2182414620) that seem to be related to combining Polyester.@batch and Base.Threads.
Polyester.@batch
Base.Threads
PointNeighbors.jl uses Polyester.@batch within the @threaded macro.
PointNeighbors.jl
@threaded
With threaded_nhs_update=true and changing all Threads.@threads calls in Peridynamics.jl, the following differences occur for the benchmark in https://github.com/kaipartmann/Peridynamics.jl/pull/107#issuecomment-2182414620:
threaded_nhs_update=true
Threads.@threads
Peridynamics.jl
# `@threads :static` # 49.821336 seconds (2.93 M allocations: 3.263 GiB, 0.13% gc time) # `@threads` # 27.514394 seconds (2.92 M allocations: 3.262 GiB, 0.39% gc time) # `Polyester.@batch` # 11.450976 seconds (2.34 M allocations: 3.199 GiB, 0.49% gc time)
Originally posted by @kaipartmann in https://github.com/kaipartmann/Peridynamics.jl/issues/107#issuecomment-2182525712
@efaulhaber
There are differences in performance (see https://github.com/kaipartmann/Peridynamics.jl/pull/107#issuecomment-2182414620) that seem to be related to combining
Polyester.@batch
andBase.Threads
.PointNeighbors.jl
usesPolyester.@batch
within the@threaded
macro.With
threaded_nhs_update=true
and changing allThreads.@threads
calls inPeridynamics.jl
, the following differences occur for the benchmark in https://github.com/kaipartmann/Peridynamics.jl/pull/107#issuecomment-2182414620:Originally posted by @kaipartmann in https://github.com/kaipartmann/Peridynamics.jl/issues/107#issuecomment-2182525712