[repo-assist] perf: add Pow, PopulationVariance, SampleVariance, Parse, TryParse benchmarks - #221
Draft
github-actions[bot] wants to merge 1 commit into
Conversation
…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>
13 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🤖 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
_powBase/_powBaseDoublePowExponentParseInput"1234.567890123"_varianceSum/_varianceSumOfRawSquaresGlobalSetupExtends the existing setup loop to compute
_varianceSumand_varianceSumOfRawSquaresfrom the 1,024-element_fixedValuesarray, so the variance benchmarks measure only the final computation step.New benchmark methods (9)
PowRawFpn.Pow(_powBase, 5)PowDecimalReferenceFromDecimal(Math.Pow(..., 5))PowDoubleReferenceMath.Pow(_powBaseDouble, 5)PopulationVarianceRawFpn.PopulationVariance(sum, sumOfSquares, n)SampleVarianceRawFpn.SampleVariance(sum, sumOfSquares, n)ParseRawFpn.Parse("1234.567890123")ParseDecimalReferenceFromDecimal(decimal.Parse(...))TryParseRawFpn.TryParse("1234.567890123", out _)TryParseDecimalReferencedecimal.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
Add this agentic workflows to your repo
To install this agentic workflow, run