Teach 'already_tokenized()' to use the stream name hash table
commit87f4a7fda3d17c85e966e2a150084d6a1cf25ab4
authorLinus Torvalds <torvalds@linux-foundation.org>
Tue, 19 Apr 2011 20:06:45 +0000 (19 13:06 -0700)
committerChristopher Li <sparse@chrisli.org>
Tue, 19 Apr 2011 20:52:12 +0000 (19 13:52 -0700)
treed88774ee1cfcaf66eb8b3ceedaddf448ce8a4a1b
parent52df775e6235b81ddb44f885214f40ea562a61ea
Teach 'already_tokenized()' to use the stream name hash table

This replaces the "loop over all streams" with a simple hash lookup.  It
makes the cost of checking for already tokenized streams basically go
away (it could be up to 5% of CPU time, almost entirely due to the
"strcmp()" of the name).

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Christopher Li <sparse@chrisli.org>
pre-process.c