On 09-07-17 20:45, Phil Endecott via Boost wrote:
(I believe that some of the discussion has used this "optimised parser" as a justification for not making the code more generic, i.e. to work with any iterator pairs. I believe that to be flawed, since (a) I don't think this optimisation is useful, and (b) even if it were, the code could use it for any contiguous iterators, and fall back to "unoptimised" code in other cases. I think that having the "unoptimised" code present would be useful for documenting what the parser is trying to do, in any case.) +1 for this sentiment.
Boost has an excellent library for fast and versatile parsing. Using it instead would at once lend a level of testing infeasible with the hand-written code here AND make sure it runs on all target architectures, as well as on any type of iterators. I think indeed premature optimization does not benefit the library - certainly in this stage of adoption.