Skip to content

Flat container builders #507

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

Merged
merged 8 commits into from
Aug 18, 2025
Merged

Flat container builders #507

merged 8 commits into from
Aug 18, 2025

Conversation

atuchin-m
Copy link
Collaborator

@atuchin-m atuchin-m commented Aug 14, 2025

The PR introduces new structures to be used in cosmetic_filters:

  • FlatSerialize trait for things that can be serialized to flatbuffer;
  • Builder structure to help construct a serializable representation + unit tests;
  • Migrate network filter to the new API;
  • Increase MIN_ALIGNMENT to 8 to support using u64 as a key.

@atuchin-m atuchin-m requested a review from boocmp August 14, 2025 11:24
@atuchin-m atuchin-m self-assigned this Aug 14, 2025
Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rust Benchmark

Benchmark suite Current: 352d7a2 Previous: eb5c30c Ratio
rule-match-browserlike/brave-list 2218538341 ns/iter (± 12515353) 2278858883 ns/iter (± 38485237) 0.97
rule-match-first-request/brave-list 1056396 ns/iter (± 68056) 1019219 ns/iter (± 12255) 1.04
blocker_new/brave-list 148103386 ns/iter (± 604955) 162380552 ns/iter (± 5943396) 0.91
blocker_new/brave-list-deserialize 63609511 ns/iter (± 559308) 65009694 ns/iter (± 2409298) 0.98
memory-usage/brave-list-initial 17605276 ns/iter (± 3) 17549140 ns/iter (± 3) 1.00
memory-usage/brave-list-initial/max 64817658 ns/iter (± 3) 64817658 ns/iter (± 3) 1
memory-usage/brave-list-initial/alloc-count 1515380 ns/iter (± 3) 1515544 ns/iter (± 3) 1.00
memory-usage/brave-list-1000-requests 2516487 ns/iter (± 3) 2505576 ns/iter (± 3) 1.00
memory-usage/brave-list-1000-requests/alloc-count 66641 ns/iter (± 3) 66123 ns/iter (± 3) 1.01
url_cosmetic_resources/brave-list 211410 ns/iter (± 1809) 213731 ns/iter (± 2730) 0.99
cosmetic-class-id-match/brave-list 4261364 ns/iter (± 1162191) 4346725 ns/iter (± 1205995) 0.98

This comment was automatically generated by workflow using github-action-benchmark.

@atuchin-m atuchin-m force-pushed the flat-containter-builders branch from e74ef6e to 6e0e572 Compare August 14, 2025 12:15
@atuchin-m atuchin-m marked this pull request as ready for review August 14, 2025 17:03
@atuchin-m atuchin-m requested a review from antonok-edm as a code owner August 14, 2025 17:03
Comment on lines -6 to -7
// Should be 4 while we support armv7 and x86_32.
const MIN_ALIGNMENT: usize = 4;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no longer supporting 32-bit architectures at all?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we do. in case the point isn't aligned to 4 bytes it will be aligned manually.

@atuchin-m atuchin-m force-pushed the flat-containter-builders branch from 690a3e5 to 352d7a2 Compare August 18, 2025 12:04
@atuchin-m atuchin-m merged commit 0b668fc into 0.11.x Aug 18, 2025
7 checks passed
@atuchin-m atuchin-m deleted the flat-containter-builders branch August 18, 2025 12:19
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.

3 participants