On 06/03/2014 04:46 AM, Amos Jeffries wrote:

> This replaces the SBuf::trim() to use CharacterSet instead of an SBuf()
> list of characters and memchr()
> 
> It seems to be faster for CharacterSet lookup than repeated memchr
> calls, but Im not certain of that. It is certainly makes simpler parser
> code with trim and a predefined CharacterSet than static SBuf set of chars.

I agree that CharacterSet membership test should be faster than repeated
memchr() calls.

No objections to this patch, although I suspect that any code calling
SBuf::trim() should actually use Tokenizer instead; we may be optimizing
code that should not be used in the first place.


Cheers,

Alex.

Reply via email to