chandlerc wrote:

> You mention the performance tradeoff of pascal strings v null terminated ones 
> doesn't seem too important - I guess that's based on some judgement about 
> where/how these are used/where the strlens end up happening that you've 
> looked into? Could you summarize that in a bit more detail (like they only 
> happen during diagnostic processing, or something?)

I've not dug deeply, but the only code using it is updated in this PR. The 
biggest use is right before copying the string contents into a `std::string` 
(potentially including allocation), so the `strlen` seems definitively no 
problem there. The other one is a binary search for a string which is already 
somewhat unoptimized, but doesn't seem like a critical path of anything that 
needs to be optimized heavily. The pascal size there doesn't really help either 
as the search looks at the string content first for order.

I'm moderately confident this isn't a problem, just mentioned it in case there 
was something really weird I missed that means I need to take the other 
approach.

https://github.com/llvm/llvm-project/pull/123302
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to