Skip to content

New Hash Function #850

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

Open
bjornbytes opened this issue Mar 6, 2025 · 0 comments
Open

New Hash Function #850

bjornbytes opened this issue Mar 6, 2025 · 0 comments

Comments

@bjornbytes
Copy link
Owner

Currently lovr uses FNV1a for hashing. The implementation in util.h is like 5 lines, but because it hashes the input 1 byte at a time, it's slow for large inputs. It might be better to switch to a faster hash function like xxh3 or rapidhash (previously wyhash). These are a lot faster because they hash multiple bytes at a time. I wonder if this could have a meaningful difference in performance anywhere. Hashing the gpu_pipeline_info structs might be noticeable, because that struct is a few hundred bytes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant