JuliaMath / JuliaMath/Richardson.jl

Passing a buffer to `extrapolate`?

Open
#19 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Julia
Stars
65
Forks
4
PR merge metrics
No merged PRs in 30d

Description

I have some code that makes constant use of `extrapolate`, and while probably not a bottleneck in my use case, I was wondering if it would be possible/desirable to modify `extrapolate` so that we can pass the buffer used to store the diagonal of the `neville` tableau. Here is what I get right now:

```julia
julia> @btime extrapolate(cos, 1)
73.269 ns (3 allocations: 160 bytes)
(1.0, 1.4518386493023172e-12)
```

The goal would be to allow e.g. `extrapolate(cos,1;buffer=...)` to avoid allocations provided `buffer` is an empty vector of sufficiently large capacity.

I would be happy to put together a PR if this seems desirable.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by locating the `extrapolate` entry point and the `neville` tableau implementation, then reproduce the reported allocation benchmark. The work is done when `extrapolate` accepts a sufficiently sized buffer for the tableau diagonal and the benchmark demonstrates that the buffer avoids the reported allocations.

Written by the indexing model from the issue text.

Assessment

Tech stack
julia
Domain
performance
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.