-
Notifications
You must be signed in to change notification settings - Fork 552
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
Improve byte buffer iteration speed by 90% #664
Conversation
…o a missed compiler optimization
This seems to be a long time opened PR. We're in a bit of a situation right now where CI is executed on Intel, but local devices are Apple Silicon. The performance gain in this change is invaluable cost/time wise. Is there any reason this hasn't been merged in yet? @stephencelis (maybe worth a chime in if there's a potential implementation issue) |
@jflan-dd @mbrandonw @stephencelis Guys, could we please get any attention on this repo and merge those extremely great and useful PRs? 🙏🏼 |
@Kaspik I wish I could help, but I'm not a maintainer on this repo. I wrote https://github.com/doordash-oss/swiftui-preview-snapshots which is a "plugin" for this repo, but it's purely a third party contribution. |
@stephencelis And this one please. |
Just a +1 from me. I‘ve been suffering from the slowness of the non-perceptual UIImage snapshot tests byte buffer comparison, and identified that it is exactly this loop causing the slowness. And I can confirm that the fix in this PR does work for me as expected, making the comparison massively faster. I may have to fork the repo and include this fix until this gets resolved. |
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.
Sorry for the late response, but this looks good to us. Will merge!
Actually going to close this and re-open a PR with some small fixes and re-based on top of |
We just released this in 1.15.1. |
❤️ lovely, thank you. |
Overview
Improves the speed of comparing memory buffers by using an alternative to
for in
which is significantly slower when compiler optimizations are disabled - such as most unit test scenarios. SR-6983Related Issues: