The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.
NFA: Lexed in 0.713062 msec
*NFA+DFA (optimized): Lexed in 0.491195 msec
*DFA: Lexed in 0.493133 msec
NFA (raw): Lexed in 1.516519 msec
DFA (raw): Lexed in 0.147636 msec
I think this is interesting in that all but the (raw) are powered by my Pike VM, but the two Raw runs are just implemented using straight finite automata
The raw DFA is of course the fastest by far, but what's interesting about it is this is a special case of the raw NFA algorithm. However, the raw NFA algorithm is much slower than the pike vm! For the DFAs it's the opposite, because of the overhead of running a pike VM, but the pike VM does NFA very efficiently. That's a really interesting property of it.
I might be able to take advantage of that to create some kind of NFA based workflow engine powered by a pike VM
* same lexer program - the NFA+DFA optimized is pure DFA in this instance
Real programmers use butterflies
Last Visit: 29-May-20 10:51 Last Update: 29-May-20 10:51