Re: [PATCH v4 14/14] of: Improve __of_add_property_sysfs() readability

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 2025/1/14 07:46, Rob Herring wrote:
>> i understand your concern about performance.
>>
>> what about below solution ?
> See 72921427d46b ("string.h: Add str_has_prefix() helper function"). 
> 
> Though we already had strstarts(), but that lacks __always_inline which 
> seems is important for eliminating the strlen(). Also, since that 
> commit, clang has become more common and need to make sure the same 
> optimization happens on it.

than you Rob for sharing with these useful info.

i believe your proposal is feasible to improve  strstarts() performance
to achieve performance level of
strncmp(str, "const", sizeof("const") - 1).


this is a common issue and i would like to start a new thread to discuss
this.





[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux