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

Consider using rustc-hash instead of the default std hasher for statement caching. #233

Open
LouisGariepy opened this issue Jan 14, 2023 · 1 comment
Labels
A-postgres Area: PostgreSQL support / deadpool-postgres enhancement New feature or request

Comments

@LouisGariepy
Copy link

LouisGariepy commented Jan 14, 2023

I ran a few benchmarks on plausible SQL queries of different sizes, and this change improves hashing performance by 30% to 50%.

The std hasher is DoS-safe and cryptographically "strong" (broadly speaking), which is probably not needed for this library since in most cases the author controls which statements are prepared.

@bikeshedder bikeshedder added enhancement New feature or request A-postgres Area: PostgreSQL support / deadpool-postgres labels Jan 17, 2023
@LouisGariepy
Copy link
Author

Opened a PR for discussion. #234

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-postgres Area: PostgreSQL support / deadpool-postgres enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants