Why is flex pattern-matching of NULs slow?

Roger L Costello <costello@mitre.org>
Fri, 8 Apr 2022 11:06:00 +0000

          From comp.compilers

Related articles
Why is flex pattern-matching of NULs slow? costello@mitre.org (Roger L Costello) (2022-04-08)
Why is flex pattern-matching of NULs slow? christopher.f.clark@compiler-resources.com (Christopher F Clark) (2022-04-09)
| List of all articles for this month |

From: Roger L Costello <costello@mitre.org>
Newsgroups: comp.compilers
Date: Fri, 8 Apr 2022 11:06:00 +0000
Organization: Compilers Central
Injection-Info: gal.iecc.com; posting-host="news.iecc.com:2001:470:1f07:1126:0:676f:7373:6970"; logging-data="77256"; mail-complaints-to="abuse@iecc.com"
Keywords: lex, performance, question, comment
Posted-Date: 08 Apr 2022 11:48:17 EDT
Accept-Language: en-US
Content-Language: en-US

Hi Folks,


The Flex manual says this:


        Pattern-matching of NULs is substantially slower
        than matching other characters.


Why is that?


/Roger
[My recollection is that zero is used as a flag value in internal
tables and there is some slow kludge to say that this is a nul not the
flag, but perhaps someone who has looked at the code more recently
will remember the details. -John]


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.