[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20a75803-7519-4e0c-8eec-15dd74bee17f@icloud.com>
Date: Tue, 14 Jan 2025 23:13:24 +0800
From: Zijun Hu <zijun_hu@...oud.com>
To: Rob Herring <robh@...nel.org>
Cc: Saravana Kannan <saravanak@...gle.com>, Maxime Ripard
<mripard@...nel.org>, Robin Murphy <robin.murphy@....com>,
Grant Likely <grant.likely@...retlab.ca>, Marc Zyngier <maz@...nel.org>,
Andreas Herrmann <andreas.herrmann@...xeda.com>,
Marek Szyprowski <m.szyprowski@...sung.com>,
Catalin Marinas <catalin.marinas@....com>, Mike Rapoport <rppt@...nel.org>,
Oreoluwa Babatunde <quic_obabatun@...cinc.com>, devicetree@...r.kernel.org,
linux-kernel@...r.kernel.org, Zijun Hu <quic_zijuhu@...cinc.com>
Subject: Re: [PATCH v4 14/14] of: Improve __of_add_property_sysfs()
readability
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.
Powered by blists - more mailing lists