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

Update noise.rs #24

Merged
merged 2 commits into from
Oct 7, 2024
Merged

Update noise.rs #24

merged 2 commits into from
Oct 7, 2024

Conversation

Tuurlijk
Copy link
Contributor

Add brown noise generator

Add brown noise generator
@Tuurlijk
Copy link
Contributor Author

Is there a way I can benchmark the noise generators? I'm quite new to cargo bench, so I could use some pointers.

@ErikNatanael
Copy link
Owner

Thank you!

Is there a way I can benchmark the noise generators? I'm quite new to cargo bench, so I could use some pointers.

Yes, using KnystOffline is the easiest way:
https://github.com/ErikNatanael/knyst/blob/84416fe2bacee0305b7bfd1d87043a32aa06d6a5/knyst/src/gen/osc.rs#L577C1-L591C67
And add a Criterion benchmark, see
https://github.com/ErikNatanael/knyst/blob/main/knyst/benches/large_sine_graph.rs
I haven't updated that benchmark to use KnystOffline though.

One caveat is that runtime performance is often different from micro benchmarks so for a more real world test you could create an example binary and look at real CPU usage, at what point you're starting to hit xruns etc. I'm sure there are better ways as well.

@ErikNatanael ErikNatanael merged commit 2b52914 into ErikNatanael:main Oct 7, 2024
1 of 2 checks passed
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