Skip to content

perf: mark evaluate::polynomial #[inline]#420

Draft
agene0001 wants to merge 1 commit into
statrs-dev:mainfrom
agene0001:perf/inline-polynomial
Draft

perf: mark evaluate::polynomial #[inline]#420
agene0001 wants to merge 1 commit into
statrs-dev:mainfrom
agene0001:perf/inline-polynomial

Conversation

@agene0001

Copy link
Copy Markdown

Every in-crate caller passes a const coefficient slice, so with the length known at the call site LLVM fully unrolls the Horner fold — ~4x against the outlined loop when measured in isolation.

Honest scope: LLVM already inlines this within the crate, so in-crate timings don't move. The attribute makes that guaranteed rather than incidental, and extends it across codegen units and to external callers of this public function. Lowest priority of the series — feel free to close if not wanted.

🤖 Generated with Claude Code

Every in-crate caller passes a `const` coefficient slice, so with the length
known at the call site LLVM fully unrolls the Horner fold - roughly 4x against
the outlined loop when measured in isolation.

Honest scope: LLVM was already inlining this within the crate, so `erf` timing
does not move. The attribute makes that guaranteed rather than incidental, and
extends it across codegen units and to external callers of this public function.
Lowest priority of the series.
agene0001 added a commit to agene0001/statrs that referenced this pull request Jul 26, 2026
Brings the integration branch to the exact union of PRs statrs-dev#407-statrs-dev#420: adds the
NaN regression test written for statrs-dev#407 (statrs-dev#163), relocates the
Geometric near-1 test to match the prec PR, and aligns two comment/tolerance
details.
@agene0001
agene0001 marked this pull request as draft July 27, 2026 08:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant