[PATCH] trivial optimization for tokenizer
commit51a66e1ca810947587d8216d990d22af023886cc
authorAlexander Viro <viro@parcelfarce.linux.theplanet.co.uk>
Tue, 15 Jun 2004 14:56:04 +0000 (15 07:56 -0700)
committerLinus Torvalds <torvalds@ppc970.osdl.org>
Fri, 8 Apr 2005 04:02:07 +0000 (7 21:02 -0700)
treee0f19b01f668d38ecb8e4e66b198ea79a1782f7c
parent669244d22464b8e3af138f4df9e1f914f6feeffb
[PATCH] trivial optimization for tokenizer

We have no reason to try any combinations unless the second character is
a punctuation one; that kills a fairly expensive (and fruitless) search
for most of special tokens - they tend to be
a) one-character
b) followed by a space, letter or digit.

That optimization alone gives about 8% speed-up - not too lousy for what
essentially is a one-liner.
tokenize.c