Skip to content

Implement quota-count#99

Draft
giorgi-o wants to merge 15 commits into
mainfrom
quota-count
Draft

Implement quota-count#99
giorgi-o wants to merge 15 commits into
mainfrom
quota-count

Conversation

@giorgi-o
Copy link
Copy Markdown
Member

TODO: implement tests

@giorgi-o giorgi-o requested a review from tholop December 16, 2025 16:18
@giorgi-o giorgi-o force-pushed the quota-count branch 2 times, most recently from 638eafd to d04aa98 Compare December 17, 2025 05:28
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
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.
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

Successfully merging this pull request may close these issues.

1 participant