Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Replace
eval
by generated function (#119)
* Replace `eval` by generated function Benchmarked on Turing.jl/test/stdlib/RandomMeasures.jl ``` julia> @benchmark run_chain() # eval BenchmarkTools.Trial: 1 sample with 1 evaluation. Single result which took 15.231 s (1.52% GC) to evaluate, with a memory estimate of 679.26 MiB, over 9452913 allocations. julia> @benchmark run_chain() # splatnew BenchmarkTools.Trial: 1 sample with 1 evaluation. Single result which took 14.665 s (1.55% GC) to evaluate, with a memory estimate of 655.23 MiB, over 8972863 allocations. julia> @benchmark run_chain() # eval BenchmarkTools.Trial: 1 sample with 1 evaluation. Single result which took 16.465 s (1.41% GC) to evaluate, with a memory estimate of 679.21 MiB, over 9452903 allocations. julia> @benchmark run_chain() # splatnew BenchmarkTools.Trial: 1 sample with 1 evaluation. Single result which took 15.409 s (1.50% GC) to evaluate, with a memory estimate of 655.34 MiB, over 8972879 allocations. ``` So about 3.5% runtime reduction. * Remove type annotation from generated function
- Loading branch information
8aaea77
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@JuliaRegistrator register
8aaea77
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Registration pull request created: JuliaRegistries/General/54929
After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.
This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via: