-
-
Notifications
You must be signed in to change notification settings - Fork 9
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
Performance Improvements #125
base: main
Are you sure you want to change the base?
Conversation
…to performance-updates
Due to the size of these changes, it may be better to split the In fact, considering the amount of code added to |
I'm fine with this PR size. Not sure about separating it into its own crate though. Users can use this crate without default |
EDIT: Added back in PR #127 Can we add back the previously available Something like this: pub fn to_u32_vec(&self) -> Option<Vec<u32>> {
match self.segments.last() {
Some(AsPathSegment::AsSequence(v)) => Some(v.iter().map(|asn| (*asn).into()).collect()),
_ => None,
}
} |
The aim of this pull request is to improve overall parsing performance. These changes have largely been motivated by profiles conducted using Intel VTune, statistics on the general arrangement of MRT records collected using https://github.com/jmeggitt/bgp_attribute_survey, the new
mrt_type
benchmark, and personal intuition regarding performance.Most of these changes are related to allocation and #85 .
Despite being quite lengthy, this pull request is not complete as there are still a couple of areas I want to get to. Particularly, I would like to make an
AttributesStorage
type which allows inlining some of the most common attribute groups. I will update this description with additional details on what/why various things are being done when this draft is converted to a regular pull request.Currently, these changes improve performance by roughly ~2x as shown by the
mrt_type
benchmark.