Improve allocation behavior in NUTS
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 2.8k
- Forks
- 388
- Avg merge
- 2d 17h
- Merged PRs (30d)
- 15
Description
As discussed on the forums, @sims1253 found several ways to remove short-lived repeated allocations in our NUTS code, see https://github.com/sims1253/stan/pull/1
This is consistent with observations that @bob-carpenter and I have made in walnutpie, where it appears to outperform Stan even when using settings designed to make it as similar as possible to Stan's implementation of NUTS. We suspected memory allocations, which walnutpie is quite careful with, to be one possible source
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the NUTS implementation and review the forum discussion and the referenced pull request at https://github.com/sims1253/stan/pull/1. Identify short-lived repeated allocations in the NUTS code, then compare allocation behavior and performance with the existing implementation; done means the targeted allocations are reduced without changing sampling behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- performance
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Needs clarification
- Newbie friendliness
- 38/100