[PATCH] D90386: [ADT] Add methods to SmallString for efficient concatenation

David Blaikie via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 29 12:23:11 PDT 2020


dblaikie added a comment.

Could you refresh my memory on whether reserve has the same growth semantics as other size-increasing operations? I'm slightly concerned that if reserve only reserves the exact amount required (compared to an append or similar operation exceeding the capacity which would/should cause the usual multiplication factor growth) that this change as-is might hinder performance (eg: a loop that appends two things today would be getting the multiplicative growth - but then if it ends up with a reserve(size of two strings) call in it maybe it keeps only growing just enough on each loop iteration, incurring more growths?)?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D90386



More information about the llvm-commits mailing list