[PATCH] D90244: [clang-tidy][NFC] IdentifierNaming: Remove unnecessary string allocations

Nathan James via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Oct 27 13:51:05 PDT 2020


njames93 added a comment.

In D90244#2357130 <https://reviews.llvm.org/D90244#2357130>, @aaron.ballman wrote:

> Was this caused by a performance concern when profiling something? I'm not opposed to the changes, but I do think the original formulation is easier to read.

It's not a huge performance concern, but removing up to 156 malloc calls* for each time we read** or store the style is certainly reason for this.

*Depends on standard library implementations small string optimisation buffer size.
**Happens multiple times as of 4888c9ce <https://reviews.llvm.org/rG4888c9ce97d8c20d988212b10f1045e3c4022b8e>.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D90244



More information about the cfe-commits mailing list