Re: Steps required to use FPHG
I did have one idea for the core loop that I almost forgot, when processing a text frag we search all the way up the buffer for a terminator like 'wins', wouldn't it be quicker to branch as soon as we detect stars, and compare something like tables[i].lastchar to &buffer[tables[i].len] to see if the last char of buffer matches our stored lastchar value? if it does, we can work backward until we're confident its a match and not a random hit. This should save a few hundred compares per stars hit at a cost of storing a few chars per table.
edit: sorry, just realised the extra cost of matching the table name for every stars hit will very likely outweigh any gain
|