This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug other/83786] New: Add VEC_ORDERED_REMOVE_IF


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83786

            Bug ID: 83786
           Summary: Add VEC_ORDERED_REMOVE_IF
           Product: gcc
           Version: 8.0
            Status: UNCONFIRMED
          Severity: trivial
          Priority: P3
         Component: other
          Assignee: unassigned at gcc dot gnu.org
          Reporter: vries at gcc dot gnu.org
  Target Milestone: ---

There's a common pattern of using vec::ordered_remove in a loop to remove some
elements, which has  O(n^2) complexity.

I've written a patch that adds the macro VEC_ORDERED_REMOVE_IF which can be
used in such a case to achieve the same, but with O(n) complexity.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]