Predicting in a loop makes loads of allocations
Open
Nobody has claimed this yet.
help wanted
infrastructure
- Dominant language
- Rust
- Stars
- 4.7k
- Forks
- 334
- Avg merge
- 39m
- Merged PRs (30d)
- 1
Description
We could add a version of Predict::predict which would write the output to a buffer instead of allocating the output.
Something like PredictInplace::predict_inplace. With a signature like fn predict_inplace(&self, x: &R, y: &mut T).
Implementation
- implement buffer reuse with
predict_inplace - add error handling for
predict_inplace
Update algorithms
- K-Means clustering
- check other algorithms for feasibility
Contributor guide
No contributing guide indexed for this repository
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 by locating Predict::predict and the existing predict_inplace implementation, then inspect the K-Means code and other algorithms for reuse feasibility. Done means adding the requested error handling and determining which remaining algorithms can support buffer reuse.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- machine-learning, performance
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100