Improve performance by removing fnv
dependency
#21
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hey, long time no see. Thanks for maintaining this in my absence. (In case you're wondering, my old account was tied to my university email, which I lost access to.)
Anywho, I chose
fnv
back in b93b80f becausestd::collections::HashMap
had somewhat worse performance. It seems things have changed, and nowstd
's hashmap/hashset is better now.fnv
is also really terrible with larger keys, which we're dealing with here due to using strings to store MIME types. I also took the liberty of adding the new test files to the benchmarks and removing the duplicate files there.Some numbers from my Intel Core i5-1135G7:
fnv
std::collections
It's not a substantial improvement, but it's something, and it lets us drop a dependency. Feel free to test on your machine. Keep in mind that individual test performance for
from_u8
is dependent in part on whatever order the graph nodes get inserted in.