-
Notifications
You must be signed in to change notification settings - Fork 18
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
Refactor hflip, vflip functions to allow preallocation #117
Conversation
Fixed formatting. |
I benchmarked horizontal_flip with the following code variations:
The general trend is that (4) usually comes out on top, followed closely by (3), and then (2), (5) and (1) at the last. In case of larger images (1024x896), the difference between the (4), (3) and (2) is usually small and inconsistent between runs. Criterion.rs Line chart (open in new tab if in dark mode): The average time value from the last 1024x896 run are: Here's the full report generated by criterion: Please let me know your thoughts on this or if you have any other ideas to compare. |
let's keep |
Done. |
Merging this, actually would be great as a post pr, to verify against known libraries like image-rs |
I tried including image_rs in the benchmark (similar to how it is in bench_resize.rs), but my PC (16GB RAM) does not have enough memory for the full test. It gets terminated by the linux OOM killer before the 1024x896 test. The resize benchmark also crashes midway on my PC. For 256x224 and 512x448, image-rs performs much worse (eg. 1.0548 ms for For ref, here's the patch (Let me know if you want me to include it in this PR): |
For #103