Open MilesCranmer opened 5 months ago
Here's the benchmarks, btw: https://github.com/SymbolicML/DynamicExpressions.jl/pull/65#issuecomment-1925488799
So pretty good performance over regular allocations with @inbounds @simd
, and also decent performance gain over regular allocations + @turbo
.
I read in the README:
Happy to share that I just added support for Bumper.jl in DynamicExpressions.jl, which means people can soon also use it for SymbolicRegression.jl and PySR.
My use-case is coded up in this file with the important part being:
Basically it's a recursive evaluation scheme for an arbitrary symbolic expression over a 2D array of data. Preliminary result show a massive performance gain with bump allocation! Even faster than LoopVectorization (though the user could even turn on both, though I don't see much more of an improvement).
The way you can write an integration test is:
You could also random generate expressions if you want to use this as a way to stress test the bump allocator. The code to generate trees is here
which lets you do
Cheers, Miles
P.S., any tips on how I'm using bumper allocation would be much appreciated!! For example, I do know exactly how large the allocation should be in advance – can that help me get more perf at all?