upstream: Uses a more efficient type for ClusterMap#44006
upstream: Uses a more efficient type for ClusterMap#44006RyanTheOptimist merged 7 commits intoenvoyproxy:mainfrom
Conversation
…-efficient. Signed-off-by: Biren Roy <birenroy@google.com>
Signed-off-by: Biren Roy <birenroy@google.com>
|
/assign @adisuissa |
|
/assign @paul-r-gall |
Signed-off-by: Biren Roy <birenroy@google.com>
Signed-off-by: Biren Roy <birenroy@google.com>
|
I'm having a hard time understanding why |
adisuissa
left a comment
There was a problem hiding this comment.
Oh, I actually have a different PR (#44015) in draft mode at the moment (to make sure it works with all the tests), that takes a different approach by removing the need to use clusters() in many places.
What do you think are the performance tradeoffs between the two approaches (keeping the ordered map vs. avoiding the clusters() invocation)?
|
@adisuissa I think your PR resolves an orthogonal problem. |
If the ordering is still needed, then the other PR needs to support temporary sorting prior to iterating, which makes the improvement (avoiding the creation of temporary maps/lists) moot. |
Signed-off-by: Biren Roy <birenroy@google.com>
Signed-off-by: Biren Roy <birenroy@google.com>
Signed-off-by: Biren Roy <birenroy@google.com>
|
Alright, I've moved back to using |
|
/retest |
I don't quite understand this comment - any caller of |
|
/assign @RyanTheOptimist |
That's an important observation. I think what threw me off is the comment, that was added a while ago (implying that this change was intentional): I wonder if that is no longer the case, and if there are no other dependencies on the order in all other usages. If that's so, absl::flat_hash_map can definitely be used here. |
This change replaces `std::map` with `absl::btree_map`, which is more efficient in terms of memory allocations and CPU/memory operations per lookup. Commit Message: upstream: Uses a more efficient type for ClusterMap Additional Description: Risk Level: Testing: ran unit and integration tests locally Docs Changes: Release Notes: Platform Specific Features: --------- Signed-off-by: Biren Roy <birenroy@google.com>
This change replaces `std::map` with `absl::btree_map`, which is more efficient in terms of memory allocations and CPU/memory operations per lookup. Commit Message: upstream: Uses a more efficient type for ClusterMap Additional Description: Risk Level: Testing: ran unit and integration tests locally Docs Changes: Release Notes: Platform Specific Features: --------- Signed-off-by: Biren Roy <birenroy@google.com> Signed-off-by: Xuyang Tao <taoxuy@google.com>
This change replaces `std::map` with `absl::btree_map`, which is more efficient in terms of memory allocations and CPU/memory operations per lookup. Commit Message: upstream: Uses a more efficient type for ClusterMap Additional Description: Risk Level: Testing: ran unit and integration tests locally Docs Changes: Release Notes: Platform Specific Features: --------- Signed-off-by: Biren Roy <birenroy@google.com> Signed-off-by: Jonathan Wu <jtwu@google.com>
This change replaces `std::map` with `absl::btree_map`, which is more efficient in terms of memory allocations and CPU/memory operations per lookup. Commit Message: upstream: Uses a more efficient type for ClusterMap Additional Description: Risk Level: Testing: ran unit and integration tests locally Docs Changes: Release Notes: Platform Specific Features: --------- Signed-off-by: Biren Roy <birenroy@google.com> Signed-off-by: Nick Shipilov <nick.shipilov.n@gmail.com>
This change replaces
std::mapwithabsl::btree_map, which is more efficient in terms of memory allocations and CPU/memory operations per lookup.Commit Message: upstream: Uses a more efficient type for ClusterMap
Additional Description:
Risk Level:
Testing: ran unit and integration tests locally
Docs Changes:
Release Notes:
Platform Specific Features: