[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Res: Script speed improvement advice
- From: Norman Ramsey <nr@...>
- Date: Fri, 13 Feb 2009 12:55:01 -0500
What you've described is very similar to fgrep.
Some years ago Preston Briggs wrote, and I adapted, the central
algorithm in fgrep (Aho-Corasick multi-string search) in C, as part of
the noweb package. As part of Noweb 3, most of the code got exported
to Lua version 2.5. If you google for Noweb and get the Noweb 3
sources for c/recognize.*, and if you have used Lua's C API, it will
not be hard to adapt. It is extremely efficient.
If there seems to be some call for such functionality, people should
let me know and maybe I'll do the adaptation myself.