-
Notifications
You must be signed in to change notification settings - Fork 1
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
WIP Histogram #54
WIP Histogram #54
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking good so far! Here are some suggestions :)
Thanks for the feedback and your great help! Next steps, as far as I can tell, are improving the decay scaling and making it adjustable. Anything else? |
src/visualizers/histogram.rs
Outdated
// let largest = self.buffer.iter().fold(std::f32::MIN, |a,b| a.max(*b)); | ||
let mut largest = 0.0; | ||
|
||
for i in 0..nr_bins { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How can I turn this into an iter?
Would that improve performance?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think you really need to do that. It would also mean creating a new iterator struct for the histogram buffer and implementing iter() or into_iter() for the buffer. It wouldn't really have any effect on performance, I think.
I just tried your
You can just leave that up to me :) |
Cool, thanks! |
OK, done. Shall I make it all into a single commit? |
A single commit? I would just merge this PR |
Most of my PR's have been for nixpkgs, and they trained me into that way of thinking. 😅 |
Oh, I see. Well let's get this merged :) |
As requested in the chat, a PR for this WIP code.