Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

In review
Cancel
10
  • 1
    Measure. Generally doing twice the work will take twice as long but without concrete data all you will get are guesses and approximations. Commented Apr 23 at 18:33
  • 10
    It is incredibly hard to accurately compare the speeds of two programs that you are being asked to imagine. Perhaps you could show two code samples? Commented Apr 23 at 18:33
  • 1
    Ok, I'll do the work :-).
    – John H.
    Commented Apr 23 at 18:44
  • 2
    Traversing a binary tree of 10 million entries in and of itself sounds like the wrong approach to begin with. Are you sure you can't use a secondary index for faster lookup of the erasure condition or maybe a proper (maybe in-memory) database? I mean, the metadata alone consumes some 500 MiB
    – Homer512
    Commented Apr 23 at 19:03
  • 4
    Please show a minimal reproducible example. One option, depending on how its used, could be to have a std::(unordered_)map where T is another container.
    – Ted Lyngmo
    Commented Apr 23 at 20:35