Unverified Commit 2fa05919 authored by Teresa Johnson's avatar Teresa Johnson Committed by GitHub
Browse files

[MemProf] Use remove_if to erase MapVector elements in bulk (#94269)

A cycle profile showed that we were spending a lot of time invoking
MapVector::erase. According to
https://llvm.org/docs/ProgrammersManual.html#llvm-adt-mapvector-h,
erasing elements one at a time is very inefficient for MapVector and it
is better to use remove_if.

This change resulted in around 7% time reduction on a large thin link.

While here remove an unused function that also invokes erase on
MapVectors.
parent d48d108b
Pipeline #3133 canceled with stages
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment