[llvm] [llvm] Improve implementation of StringRef::find_last_of and cie (PR #71865)

Alexandre Ganea via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 9 17:54:38 PST 2023


aganea wrote:

Hello @serge-sans-paille! Could you please explain a bit more in detail why do you think this is a good optimization? Less instructions retired is not necessary better if that increases the memory pressure? It might be nothing, but before the whole bitset was fitting in a cacheline, now it takes 4 cache lines to do the same thing. Again, this might be nothing, but that means 3 extra cache line being evicted elsewhere to execute this function. Also I'd like to be convinced by the profile link that you've attached, but the difference is so small that is could be normal fluctuations (also 'cycles' stat is higher). One more point, the previous bitshifting code in bitset might run better on AArch64 than on x64, so it'd be interesting to see the difference there too. Thanks!

https://github.com/llvm/llvm-project/pull/71865


More information about the llvm-commits mailing list