Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue #75070 (Dotnet Runtime) - Add a performance microbenchmark for … #2614

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

RyanThomas73
Copy link

…the new PriorityQueue DequeueEnqueue method to help monitor for performance regressions

Serves as a performance regression check benchmark for the new PriorityQueue DequeueEnqueue public api method added as part of this dotnet runtime issue dotnet/runtime#75070

…the new PriorityQueue DequeueEnqueue method to help monitor for performance regressions
…orityQueueSize_DequeueEnqueue_PerformanceRegressionBenchmark
@@ -106,5 +106,30 @@ public void K_Max_Elements()
queue.Dequeue();
}
}

[Benchmark]
public void KMaxPriorityQueueSize_DequeueEnqueue_PerformanceRegressionBenchmark()
Copy link
Member

Choose a reason for hiding this comment

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

IIRC this isn't really computing any max or min elements, since unlike EnqueueDequeue, DequeueEnqueue is never comparing the extracted min heap entry with the inserted entry. The PerformanceRegressionBenchmark suffix is redundant, since that's what all benchmarks in this repo are intended for. Recommend keeping the benchmark name ambiguous:

Suggested change
public void KMaxPriorityQueueSize_DequeueEnqueue_PerformanceRegressionBenchmark()
public void DequeueEnqueue()

@eiriktsarpalis
Copy link
Member

Thanks!

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.

3 participants