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

Benchmark for C++ PDQ Hasher #1726

Merged
merged 25 commits into from
Dec 23, 2024
Merged

Benchmark for C++ PDQ Hasher #1726

merged 25 commits into from
Dec 23, 2024

Conversation

16BitNarwhal
Copy link
Contributor

Summary

Resolve #1696

C++ benchmark program for PDQ hashing
Benchmark implementation located in pdq/cpp/bin/benchmark-photo-hasher.cpp
Benchmark results in pdq/cpp/hashing/README.md

To run:

cd pdq/cpp
make bin/benchmark-photo-hasher
./benchmark-photo-hasher

Sample results (ran on Ubuntu 24.04.1 LTS, Intel Core i7-14700KF with 20 cores, 28 threads, 64GB RAM):

$ ./benchmark-photo-hasher ../data/reg-test-input/dih/
PHOTO COUNT:               8
ERROR COUNT:               0
TIME SPENT HASHING PHOTOS (SECONDS):     0.015171
PHOTOS HASHED PER SECOND:   527.324158
TIME SPENT READING PHOTOS (SECONDS):        0.299410
PHOTOS READ PER SECOND:     26.719229

@16BitNarwhal 16BitNarwhal changed the title Hash Benchmark for C++ PDQ Hasher Dec 16, 2024
Copy link
Contributor

@Dcallies Dcallies left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Only minor comments, overall looks good. Nice find reusing existing functions in hashio

blocking q: Why did you delete b.jpg?

pdq/cpp/bin/benchmark-photo-hasher.cpp Outdated Show resolved Hide resolved
pdq/cpp/bin/benchmark-photo-hasher.cpp Outdated Show resolved Hide resolved
pdq/cpp/bin/benchmark-photo-hasher.cpp Outdated Show resolved Hide resolved
pdq/cpp/bin/benchmark-query.cpp Outdated Show resolved Hide resolved
Copy link
Contributor

@Dcallies Dcallies left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks again for updating the readme!

@Dcallies Dcallies merged commit e37e1a5 into facebook:main Dec 23, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[pdq][mlh] Add hashing benchmark to /bin
3 participants