Path: csiph.com!weretis.net!feeder6.news.weretis.net!news.misty.com!news.iecc.com!.POSTED.news.iecc.com!nerds-end From: Roger L Costello Newsgroups: comp.compilers Subject: Why is flex pattern-matching of NULs slow? Date: Fri, 8 Apr 2022 11:06:00 +0000 Organization: Compilers Central Lines: 14 Sender: news@iecc.com Approved: comp.compilers@iecc.com Message-ID: <22-04-001@comp.compilers> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8bit 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 X-submission-address: compilers@iecc.com X-moderator-address: compilers-request@iecc.com X-FAQ-and-archives: http://compilers.iecc.com Accept-Language: en-US Content-Language: en-US Xref: csiph.com comp.compilers:2971 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]