bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#24603: [RFC 16/18] Refactor character class checking; optimise ASCII


From: Michal Nazarewicz
Subject: bug#24603: [RFC 16/18] Refactor character class checking; optimise ASCII case
Date: Mon, 17 Oct 2016 15:22:34 +0200
User-agent: Notmuch/0.19+53~g2e63a09 (http://notmuchmail.org) Emacs/25.1.50.2 (x86_64-unknown-linux-gnu)

On Tue, Oct 04 2016, Eli Zaretskii wrote:
>> From: Michal Nazarewicz <mina86@mina86.com>
>> Date: Tue,  4 Oct 2016 03:10:39 +0200
>> 
>> +const unsigned char category_char_bits[] = {
>> +  [UNICODE_CATEGORY_UNKNOWN] = 0,
>> +  [UNICODE_CATEGORY_Lu] = CHAR_BIT_ALPHA_ | CHAR_BIT_UPPER,
>> +  [UNICODE_CATEGORY_Ll] = CHAR_BIT_ALPHA_ | CHAR_BIT_LOWER,
>
> Is this syntax portable enough for us to use it?

It’s a C99 feature and C99 compiler is required since Emacs 25.1.

>> +/* Limited set of character categories which syntax-independent.  Testing of
>                                           ^^^^^^^^^^^^^^^^^^^^^^^^
> "which are syntax-independent"
>
>> + * those characters do not require any run-time data, e.g. do not depend on
>                        ^^^^^^^^^^^^^^                         ^^^^^^^^^^^^^
> "does not require" and "does not depend"

Both done.

> Thanks.  I think this change will require a benchmark to make sure we
> don't lose too much in terms of performance.

Will do.

-- 
Best regards
ミハウ “𝓶𝓲𝓷𝓪86” ナザレヴイツ
«If at first you don’t succeed, give up skydiving»





reply via email to

[Prev in Thread] Current Thread [Next in Thread]