Skip to content

Conversation

@bobertlo
Copy link

This is more portable than opening /dev/urandom.

This is more portable than opening /dev/urandom.
@chmduquesne
Copy link
Owner

chmduquesne commented Sep 9, 2025

Hi,

Thank you for your contribution. Generally, I like it, however I do not think it makes sense to use crypto/rand in those benchmark tests. The idea is to see how fast those hashes can go through random data, and I am afraid that using a cryptographically secure hash is going to slow down the benchmark quite a bit. This is why I am using /dev/urandom and not /dev/random.

Would you consider switching to math/rand instead? If this is as fast as /dev/urandom I would consider this PR for integration.

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.

2 participants