Skip to content

Conversation

@NeoByteXx
Copy link

for _ in 0..(NUM_WORKERS) { → for _ in 0..NUM_WORKERS {
Improves readability and follows Rust conventions.

Fix loop condition in Spinner (signal_benchmark.rs)

if self.count > 3 { → if self.count >= 3 {
Ensures correct iteration count.

@maminrayej maminrayej added the A-benches Area: Benchmarks label Feb 24, 2025
@maminrayej
Copy link
Member

if self.count > 3 { → if self.count >= 3 {
Ensures correct iteration count.

I don't understand why the previous iteration count was wrong and what this change fixes. Could you explain the motivation behind this change?

@NeoByteXx
Copy link
Author

if self.count > 3 { → if self.count >= 3 {
Ensures correct iteration count.

I don't understand why the previous iteration count was wrong and what this change fixes. Could you explain the motivation behind this change?

The change from if self.count > 3 to if self.count >= 3 fixes a logical error in the iteration.

Previously, the condition skipped the iteration when self.count == 3, which was likely unintended. Now, the check ensures that the iteration behaves correctly when self.count reaches 3, aligning with the expected behavior.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-benches Area: Benchmarks

2 participants