Skip to content

Implemented batched rolls and benchmarking

Choose a tag to compare

@DarthPedro DarthPedro released this 12 Oct 20:33
· 2 commits to main since this release
581ff5f
  • 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).