-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
string-matcher: reduce per-matcher memory #37782
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: Adi Suissa-Peleg <[email protected]>
Signed-off-by: Adi Suissa-Peleg <[email protected]>
…rnative Signed-off-by: Adi Suissa-Peleg <[email protected]>
Signed-off-by: Adi Suissa-Peleg <[email protected]>
Signed-off-by: Adi Suissa-Peleg <[email protected]>
Signed-off-by: Adi Suissa-Peleg <[email protected]>
I've executed the router_config_impl_speed_test, using the following: and got the following results - showing only the mean of each 10 runs, and the second column is "diff%" (negative number implies that the new version is better - less time, positive number implies that the original version is better):
combined_route_config_impl_speed_test_10_mean.csv IMHO, and from running a few more tests, I've observed that these tests are somewhat noisy, and there's no clear winner. |
Signed-off-by: Adi Suissa-Peleg <[email protected]>
…rnative Signed-off-by: Adi Suissa-Peleg <[email protected]>
Signed-off-by: Adi Suissa-Peleg <[email protected]>
Signed-off-by: Adi Suissa-Peleg <[email protected]>
Commit Message: string-matcher: reduce per-matcher memory
Additional Description:
This is similar to #37324 but doesn't use virtual functions (uses std::variant instead).
These are the goals for this new StringMatcherImpl class:
Compared to #37324, this version enjoys the inlining compiler optimizations that can be made when virtual tables aren't used. The downside is the use of std::variant, which may require a bit more memory, and results in a more coupled code for the string matchers, but IMHO it improves upon the current implementation.
Risk Level: low - not being used at the moment (but future PRs will).
Testing: duplicated the tests needed
Docs Changes: N/A
Release Notes: N/A
Platform Specific Features: N/A