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

Add bindings for ahash #12

Open
uselessgoddess opened this issue Jul 25, 2022 · 5 comments
Open

Add bindings for ahash #12

uselessgoddess opened this issue Jul 25, 2022 · 5 comments

Comments

@uselessgoddess
Copy link
Member

uselessgoddess commented Jul 25, 2022

ahash is a non-crypto crazy fast hash algo without SSE and AVX instructions only for hash maps.

@Konard
Copy link
Member

Konard commented Jul 25, 2022

Can we make a benchmark? Does it provide good distribution of data?

@uselessgoddess
Copy link
Member Author

Check out this paper

@Konard
Copy link
Member

Konard commented Jul 25, 2022

I don’t see compassion with crc32 in this paper.

@uselessgoddess
Copy link
Member Author

uselessgoddess commented Jul 25, 2022

Lol. Crc is insecure, 100% bias, collisions, distrib, BIC, machine-specific (x86 SSE4.2+PCLMUL)
But I make simple tests
At random data:

throughput-example/ahash
                        time:   [4.2010 ms 4.2792 ms 4.3583 ms]
                        thrpt:  [218.82 MiB/s 222.86 MiB/s 227.01 MiB/s]
throughput-example/crc32
                        time:   [6.9233 ms 7.0549 ms 7.1902 ms]
                        thrpt:  [132.64 MiB/s 135.18 MiB/s 137.75 MiB/s]
throughput-example/crc64
                        time:   [6.7178 ms 6.7916 ms 6.8669 ms]
                        thrpt:  [138.88 MiB/s 140.42 MiB/s 141.96 MiB/s]
throughput-example/crc82
                        time:   [6.6964 ms 6.7878 ms 6.8808 ms]
                        thrpt:  [138.60 MiB/s 140.50 MiB/s 142.42 MiB/s]

At static data:

throughput-example/ahash
                        time:   [71.363 µs 73.370 µs 75.365 µs]
                        thrpt:  [12.357 GiB/s 12.693 GiB/s 13.050 GiB/s]
throughput-example/crc32
                        time:   [2.0147 ms 2.0192 ms 2.0236 ms]
                        thrpt:  [471.27 MiB/s 472.31 MiB/s 473.35 MiB/s]
throughput-example/crc64
                        time:   [2.1869 ms 2.2210 ms 2.2593 ms]
                        thrpt:  [422.11 MiB/s 429.38 MiB/s 436.08 MiB/s]
throughput-example/crc82
                        time:   [2.3661 ms 2.3768 ms 2.3875 ms]
                        thrpt:  [399.44 MiB/s 401.24 MiB/s 403.06 MiB/s]

@uselessgoddess
Copy link
Member Author

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

2 participants