Skip to content

Added batched rolls and benchmarking features - #2

Merged
DarthPedro merged 6 commits into
mainfrom
features/batched-rolls
Oct 12, 2026
Merged

DarthPedro merged 6 commits into
mainfrom
features/batched-rolls

Conversation

@DarthPedro

Copy link
Copy Markdown
Contributor
  • Updated package references to newest versions.
  • Fixed DiceCli commands due to breaking changes in Spectre.Console.Cli Command and AsyncCommand base classes.
  • Added RollMany() overloads to IDice for rolling a dice expression multiple times and returning a list of DiceResults.
  • Enabled trimming and Native AOT support for the DiceNotation library by replacing dynamic dispatch in Evaluator with a type-safe switch expression, adding a source-generated DieTrackingJsonContext for JSON serialization, and annotating UseRollTracker<TTracker, TService>() with DynamicallyAccessedMembers for generic service registration.
  • Added DiceNotation Benchmarks project to measure performance of the DiceNotation library and compare different die rollers.
  • Fixed 3 high memory allocation issues in the Lexer, Parser, and Evaluator for hot paths when rolling the same notation repeatedly. Save 78% of allocations when rolling the same notation repeatedly (with improvement to speed too).

…to Spectre.Console.Cli breaking change to Command and AsyncCommand.
…tiple times and returning a list of DiceResults.
…iceNotation library and compare different die rollers.
…essions on new features.

Fixed 3 high memory allocation issues that reduces memory usage by 78% and improves Roll performance as well.
@DarthPedro
DarthPedro merged commit 581ff5f into main Oct 12, 2026
1 check passed
@DarthPedro
DarthPedro deleted the features/batched-rolls branch October 12, 2026 20:31
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