From: David Timber <dxdt@dev.snart.me>
To: "Yuezhang.Mo@sony.com" <Yuezhang.Mo@sony.com>,
Namjae Jeon <linkinjeon@kernel.org>,
Sungjong Seo <sj1557.seo@samsung.com>
Cc: "linux-fsdevel@vger.kernel.org" <linux-fsdevel@vger.kernel.org>
Subject: Re: [PATCH v1 1/4] exfat: refactor nls.c (tables)
Date: Sun, 3 May 2026 17:03:04 +0900 [thread overview]
Message-ID: <bd7379db-dc8b-43f6-9c56-dd229a5fb1bc@dev.snart.me> (raw)
In-Reply-To: <04c4213b-0918-4736-b736-238490322880@dev.snart.me>
On 4/30/26 18:22, David Timber wrote:
> On 4/30/26 16:53, Yuezhang.Mo@sony.com wrote:
>>> +/* exfat/tables.c */
>>> +/* Upcase table macro */
>>> +#define EXFAT_NUM_UPCASE (2918)
>>> +#define EXFAT_UTBL_COUNT (0x10000)
>>> +
>>> +extern const unsigned short exfat_uni_def_upcase[EXFAT_NUM_UPCASE];
>>> +extern const unsigned short exfat_bad_uni_chars[];
>> The global variable exfat_bad_uni_chars[] is unnecessary, as is the
>> generic function exfat_wstrchr().
>>
>> We can implement a dedicated function `exfat_is_bad_uni_char()`, in
>> which we can define static `exfat_bad_uni_chars`, or we can use a
>> switch...case... statement.
> I agree.
>
> I too think that switch a case statement is suitable here because
> there's only a few __u16's to compare so there's really no need to leave
> room for cache misses. Let the CPU prefetch the characters along with
> the instructions.
>
> Will make a separate commit if no objection.
Did some fiddling and found out that that could risk performance
regression. But it's a problem specific to Clang, which is not so
popular choice of compiler in the embedded world where it could have a
significant impact.
If it doesn't bother anyone, I'll send out the reroll.
https://github.com/llvm/llvm-project/issues/127365#issuecomment-4362781091
next prev parent reply other threads:[~2026-05-03 8:03 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-28 23:50 [PATCH v1 0/4] exfat: memory optimisations and stringent integrity checks for up-case table David Timber
2026-04-28 23:50 ` [PATCH v1 1/4] exfat: refactor nls.c (tables) David Timber
2026-04-30 7:53 ` Yuezhang.Mo
2026-04-30 9:22 ` David Timber
2026-05-03 8:03 ` David Timber [this message]
2026-04-28 23:50 ` [PATCH v1 2/4] exfat: use upcase_ptable and upcase_range_info to reduce memory footprint David Timber
2026-04-30 7:58 ` Yuezhang.Mo
2026-04-30 9:45 ` David Timber
2026-04-30 11:48 ` Yuezhang.Mo
2026-04-30 17:13 ` David Timber
2026-04-28 23:50 ` [PATCH v1 3/4] exfat: add default_upcase option (read-only) David Timber
2026-04-28 23:50 ` [PATCH v1 4/4] exfat: more pedantic upcase table validity check David Timber
2026-04-30 7:58 ` Yuezhang.Mo
2026-04-30 9:24 ` David Timber
2026-05-01 11:27 ` Namjae Jeon
2026-05-01 12:20 ` David Timber
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=bd7379db-dc8b-43f6-9c56-dd229a5fb1bc@dev.snart.me \
--to=dxdt@dev.snart.me \
--cc=Yuezhang.Mo@sony.com \
--cc=linkinjeon@kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=sj1557.seo@samsung.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox