Why is pattern-matching of NULs slow?

David Starner prosfilaes at gmail.com
Fri Apr 8 18:27:33 CDT 2022


On Fri, Apr 8, 2022 at 6:25 AM Roger L Costello via Unicode
<unicode at corp.unicode.org> wrote:
> Why would pattern-matching NULs be slower than pattern-matching other characters?

Flex is written in C, and C strings use NUL as a terminator, and can't
include NUL. The demand for Flex to handle NULs would be pretty
minimal, it's mostly used on text documents that don't have NUL, and
so I suspect someone tossed in a hack to make it work with NUL when it
had to, and nobody has been back to fix it. It's mature software,
without a release in five years, so I don't see that changing.

-- 
The standard is written in English . If you have trouble understanding
a particular section, read it again and again and again . . . Sit up
straight. Eat your vegetables. Do not mumble. -- _Pascal_, ISO 7185
(1991)


More information about the Unicode mailing list