Skip to content

[repo-assist] perf: add Pow, PopulationVariance, SampleVariance, Parse, TryParse benchmarks - #221

Draft
github-actions[bot] wants to merge 1 commit into
mainfrom
repo-assist/perf-missing-benchmarks-2026-07-07-3774a9e91ff14a09
Draft

[repo-assist] perf: add Pow, PopulationVariance, SampleVariance, Parse, TryParse benchmarks#221
github-actions[bot] wants to merge 1 commit into
mainfrom
repo-assist/perf-missing-benchmarks-2026-07-07-3774a9e91ff14a09

Conversation

@github-actions

@github-actions github-actions Bot commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

🤖 This PR was created by Repo Assist, an automated AI assistant.

Summary

Adds 9 new benchmark methods covering three operation groups that had no benchmarks: Pow, variance (PopulationVariance / SampleVariance), and parsing (Parse / TryParse).

Why

The memory backlog noted these benchmarks as missing. Without them, there is no data to guide any future performance work on these paths.

Changes

New fields

Field Purpose
_powBase / _powBaseDouble Input for Pow benchmarks (1.5)
PowExponent Constant exponent = 5
ParseInput Constant string "1234.567890123"
_varianceSum / _varianceSumOfRawSquares Pre-aggregated stats for variance benchmarks

GlobalSetup

Extends the existing setup loop to compute _varianceSum and _varianceSumOfRawSquares from the 1,024-element _fixedValues array, so the variance benchmarks measure only the final computation step.

New benchmark methods (9)

Method Notes
PowRaw Fpn.Pow(_powBase, 5)
PowDecimalReference FromDecimal(Math.Pow(..., 5))
PowDoubleReference Math.Pow(_powBaseDouble, 5)
PopulationVarianceRaw Fpn.PopulationVariance(sum, sumOfSquares, n)
SampleVarianceRaw Fpn.SampleVariance(sum, sumOfSquares, n)
ParseRaw Fpn.Parse("1234.567890123")
ParseDecimalReference FromDecimal(decimal.Parse(...))
TryParseRaw Fpn.TryParse("1234.567890123", out _)
TryParseDecimalReference decimal.TryParse(..., out _)

Test Status

✅ Build succeeded (0 warnings, 0 errors)
✅ 1,426 tests passed
(Benchmarks project builds; actual BenchmarkDotNet runs are not part of the test suite.)


Task 8 – Performance Improvements

Generated by 🌈 Repo Assist, see workflow run. Learn more.

Add this agentic workflows to your repo

To install this agentic workflow, run

gh aw add githubnext/agentics/workflows/repo-assist.md@e15e57b40918dbca11b350c55d02ab61934afa75

…nchmarks

Add 9 new benchmark methods covering the operations noted as missing:
- PowRaw / PowDecimalReference / PowDoubleReference
- PopulationVarianceRaw (pre-aggregated stats benchmark)
- SampleVarianceRaw (pre-aggregated stats benchmark)
- ParseRaw / ParseDecimalReference
- TryParseRaw / TryParseDecimalReference

Pre-compute variance statistics (sum + sumOfRawSquares) in GlobalSetup
so the benchmark measures only the computation, not data ingestion.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants