[PATCH] D58787: [ProfileData] Sort ProfilingData by hash

Mandeep Singh Grang via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 28 17:40:07 PST 2019


mgrang added a comment.

In D58787#1414176 <https://reviews.llvm.org/D58787#1414176>, @dblaikie wrote:

> How about we keep the discussion on the original patch (D57986 <https://reviews.llvm.org/D57986>)? I think we explored the problem space a fair bit there & I'll advocate for the same thing here as I did there: Sorting before emission is likely more efficient than keeping a continuously sorted container, if there's a separate "build" and "iterate" phase you can sort between. At least that's my understanding. std::map and MapVector would both grow memory usage, probably not prohibitively, but a fair bit.
>
> Especially if these are just small clusters of collisions - they can be put in a small container, sorted, emitted, then thrown away - better than changing the whole long-lived/larger data structure.


I have added sort-before-iteration for FuncData in D57986 <https://reviews.llvm.org/D57986>.


Repository:
  rL LLVM

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

https://reviews.llvm.org/D58787





More information about the llvm-commits mailing list