Skip to content

feat: add multi-threaded evaluation benchmark suite#457

Merged
anakrish merged 1 commit into
microsoft:mainfrom
anakrish:eval-benchmark
Aug 22, 2025
Merged

feat: add multi-threaded evaluation benchmark suite#457
anakrish merged 1 commit into
microsoft:mainfrom
anakrish:eval-benchmark

Conversation

@anakrish

@anakrish anakrish commented Aug 12, 2025

Copy link
Copy Markdown
Collaborator

This commit introduces a complete multi-threaded evaluation benchmark suite for both Rust and C# implementations of Regorus.

  • Implemented engine evaluation benchmark with input and engine cloning strategies

  • Implemented compiled policy evaluation benchmark with input cloning and shared compiled policy strategies.

  • Created EngineEvaluationBenchmark.cs and CompiledPolicyEvaluationBenchmark.cs with time-based execution (3s warmup + 3s evaluation)

  • Implemented configuration options matching Rust implementation (useClonedEngines, useSharedPolicies parameters)

  • Created markdown analysis documentation with cross-platform performance analysis

  • C# seems to achieve 58-89% of Rust performance on test machine.

@anakrish anakrish marked this pull request as ready for review August 12, 2025 19:31
Comment thread src/interpreter.rs Fixed
@anakrish anakrish force-pushed the eval-benchmark branch 5 times, most recently from f0cad98 to 6b1a39c Compare August 21, 2025 11:47
…e C# implementation

This commit introduces a complete multi-threaded evaluation benchmark suite for both Rust and C# implementations of Regorus.

- Implemented engine evaluation benchmark with input and engine cloning strategies
- Implemented compiled policy evaluation benchmark with input cloning and shared compiled policy strategies.

- Created EngineEvaluationBenchmark.cs and CompiledPolicyEvaluationBenchmark.cs with time-based execution (3s warmup + 3s evaluation)
- Implemented configuration options matching Rust implementation (useClonedEngines, useSharedPolicies parameters)

- Created markdown analysis documentation with cross-platform performance analysis
- C# seems to achieve 58-89% of Rust performance on test machine.

Signed-off-by: Anand Krishnamoorthi <anakrish@microsoft.com>

@dpokluda dpokluda left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit:

@anakrish

Copy link
Copy Markdown
Collaborator Author

@dpokluda Thanks for the review.

@anakrish anakrish merged commit d561531 into microsoft:main Aug 22, 2025
33 checks passed
@anakrish anakrish deleted the eval-benchmark branch August 22, 2025 16:40
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.

3 participants