Implement quota-count#99
Draft
giorgi-o wants to merge 15 commits into
Draft
Conversation
638eafd to
d04aa98
Compare
Left experimental flag on by mistake in my IDE
Merge accessedImpSites and accessedConvSites into accessedSites Conversions cannot match impressions within its own user-action Misc clean-up of tests boilerplate mock event creation
d04aa98 to
0583a54
Compare
Use the entry api to only perform one hash, not two Also allow generic try_consume to use that optimization
Benchmarks showed that 7-12% of the evaluation time was spent resizing hashmaps
Speedup is around ~2x in evaluation, mainly because our hashmap keys (Uri, FilterId...) are small in size and ahash's AES hashing approach is overkill.
Profiling showed 10-15% of the eval runtime was spent allocating the hashmaps + hashing all the FilterIds. Plus, the returned hashmap is almost only ever iterated over. Vec is the logical choice.
…HashMap This is another function that returns a HashMap, but the result is always iterated over, so it doesn't need O(1) access. Profiling showed this function's HashMap::insert() was responsible for 4.7% of the eval's runtime.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
TODO: implement tests