Skip to content

Conversation

@Doryu001
Copy link

@Doryu001 Doryu001 commented Nov 3, 2025

Summary: Move the copy(output, input) out of the per-element loop in hash, so the benchmark keeps identical behavior while avoiding O(n²) copies. Why: Each iteration previously copied the entire slice even though the data was unchanged. One upfront copy preserves semantics and eliminates redundant work. Testing: go test ./async/... (cannot run here: Go toolchain missing in environment)

@CLAassistant
Copy link

CLAassistant commented Nov 3, 2025

CLA assistant check
All committers have signed the CLA.

Copy link
Member

@prestonvanloon prestonvanloon left a comment

Choose a reason for hiding this comment

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

This fundamentally changes the behavior of the test.

@prestonvanloon
Copy link
Member

Closing this since it changes the behavior significantly without a basis for doing so. The data was changed on each iteration when the hash was done and this is not identical behavior.

@prestonvanloon
Copy link
Member

Re-reading it, and I believe I was mistaken since the inner loop is not hashing all of the inputs each iteration.

@prestonvanloon prestonvanloon dismissed their stale review November 3, 2025 22:04

No explicit request any more. I'm not sure we need this, but I do not want to block it

@Doryu001 Doryu001 closed this by deleting the head repository Nov 26, 2025
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