[Lldb-commits] [PATCH] D56425: [BreakpointList] Simplify/modernize BreakpointList (NFC)

Greg Clayton via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Tue Jan 8 15:04:14 PST 2019


clayborg added a comment.

In D56425#1350253 <https://reviews.llvm.org/D56425#1350253>, @JDevlieghere wrote:

> In D56425#1350236 <https://reviews.llvm.org/D56425#1350236>, @JDevlieghere wrote:
>
> > In D56425#1350234 <https://reviews.llvm.org/D56425#1350234>, @clayborg wrote:
> >
> > > If we keep the list sorted we might be able to improve finding breakpoints by ID, but that can be done if we need to. BreakpointList::Add would need to insert it sorted, then we can get better than O(n) performance on FindBreakpointByID and Remove (anything that was using find_if when it is searching for a breakpoint by ID).
> >
> >
> > I'll do this as a follow-up.
>
>
> On second thought, maybe it's not such a good idea after all. Internal breakpoints are negative so if we keep the vector sorted we'd always insert them at the front of the vector. We could change strategies based on whether the list is internal or not, but that seems overkill, especially given the code is not that hot as Vedant pointed out.


No worries. This is why I mentioned "if we need to". Fine to wait until we need to do this for some reason that proves to be an efficiency issue


Repository:
  rLLDB LLDB

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D56425/new/

https://reviews.llvm.org/D56425





More information about the lldb-commits mailing list