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

Jonas Devlieghere via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Tue Jan 8 14:22:40 PST 2019


JDevlieghere added a comment.

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.


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