[llvm] [DebugNames] Compare TableEntry names more efficiently (PR #79759)

Felipe de Azevedo Piovezan via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 30 09:49:36 PST 2024


felipepiovezan wrote:

> So the function could be written, I think, as return Data.size() >= Target.size() && strncmp(Data.data(), Target.data(), Target.size()) == 0 && !Data[Target.size()]; I think? Something like that

I hadn't thought of that! To be clear, I also would have written a loop-less version if I had been able to make it work.
But I like David's idea, let me give this a try.

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


More information about the llvm-commits mailing list