|
Boost : |
From: John Maddock (John_Maddock_at_[hidden])
Date: 2000-08-20 05:51:06
Looks like I forgot to answer the following:
> I'd also like to see a bit of discussion on memory usage. For
>example, if I use the low level stuff with wide chars will the code
>allocate a bunch of 64K tables?
Not likely - just imagine what would happen if wchar_B was a 32-bit type
(as it is on some Unix systems), the code uses quite a compact
representation for the states that does not require large tables -
typically wide character state machines should not be any larger than
narrow character ones. The downside is that the wide character code is
less efficient - in practice though the effect is hardly noticeable - the
search time is typically bounded by the number of states examined, not the
efficiency of each state representation (within reason). One consequence
of this is that the code should be extensible to regex searches over any
POD type, I confess I am intrigued by the possibility of regex searches
over arbitrary binary data, but so far I haven't had a compelling reason to
put together a "binary_regex_traits" support class and investigate this.
- John.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk