Use Bumper.jl to reduce allocations in bulk sampling#161
Conversation
|
Another dependency, but still lightweight and reasonably stable |
Benchmark Results
Benchmark PlotsA plot of the benchmark results have been uploaded as an artifact to the workflow run for this PR. |
|
Seems to have a significant effect on performance, and allocations are now practically only the one of the sample, though Bumper internals scares me a bit |
|
I'm wondering if we can use for the same purpose yours https://github.com/LilithHafner/PtrArrays.jl @LilithHafner |
|
Tried it, seems slower than |
|
Actually it is really needed for safety the try-finally block, but I will open up a new PR with PtrArrays to try it anyway |
LilithHafner
left a comment
There was a problem hiding this comment.
What benchmarks motivate this?
How does this impact precompile time?
All cases where actually we don't see a significant effect in our benchmarks consistently, but this is because the effect is more on the average than on the minimum (around 10-15% there).
with a fresh environment on 1.11: without Bumper: julia> @time @eval using WeightVectors
Precompiling WeightVectors...
4 dependencies successfully precompiled in 2 seconds
2.040833 seconds (58.16 k allocations: 4.299 MiB, 1.00% compilation time)with Bumper: julia> @time @eval using WeightVectors
Precompiling WeightVectors...
6 dependencies successfully precompiled in 2 seconds
2.444766 seconds (75.47 k allocations: 5.830 MiB, 0.90% compilation time) |
No description provided.