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

Safe code only version #45

Open
jutuon opened this issue Nov 22, 2024 · 0 comments
Open

Safe code only version #45

jutuon opened this issue Nov 22, 2024 · 0 comments

Comments

@jutuon
Copy link

jutuon commented Nov 22, 2024

I made version of this library with safe code only. The example program produces exactly the same output image as the version with unsafe code using the bundled test image. The performance is unsuprisingly a bit worse.

MacBook Air M1 2020 and library's rayon feature is disabled.

Commit 271563b, safe code only:
detect_single_image/detect
                        time:   [334.29 ms 334.36 ms 334.44 ms]

Commit fa3d5b5, includes unsafe:
detect_single_image/detect
                        time:   [327.55 ms 327.83 ms 328.05 ms]

I think next step to optimize the safe version would be to check if nalgebra could be used in some places to make calculations use SIMD. However, I don't plan to optimize the code any further.

I didn't open PR for this because of the performance decrease, but I can open it if wanted.

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

No branches or pull requests

1 participant