Subject: Re: [boost] [regex, xpressive] interesting(?) perf benchmark
From: John Bytheway (jbytheway+boost_at_[hidden])
Date: 2010-06-08 16:31:20
On 08/06/10 15:03, Steven Watanabe wrote:
> John Bytheway wrote:
>> The library will take this lexer specification and turn it into an NFA,
>> then transform that into a DFA, then encode that as a transition table
>> in an array, *all at compile time*. On reflection, it probably would
>> have been better (and faster) to use the giant-switch-statement
>> approach, rather than an array-based transition table.
> In my experience, array lookups tend to be faster than
> switch statements.
Shame. It would have made the metaprogramming simpler (I think); the
process of turning a 2-dimensional compile-time array into a
2-dimensional runtime array requires copious preprocessor
metaprogramming (my first implementation took 20 minutes to preprocess!
I improved it substantially, though).
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk