Skip to content

Fix 'already_tokenized()' performance problem

Linus Torvalds linux-sparse 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest1 of 2 patches 5 repliesIn review

1 of 2 patches is in this archive. The cover letter announces 2.

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2Add new streams to a hash-list based on their namestoken.h tokenize.c+26 -22 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/2] Fix 'already_tokenized()' performance problem

This series of two trivial patches makes 'already_tokenized()' go away from profiles of a kernel build with C=2, shaving about 3-4% off the time for me.

This came up in a discussion on another tech board, and people were complaining that I hadn't optimized the pre-processor sufficiently.

(Depending on compiler, usually the profile will show 'strcmp()' taking all the time - it depends on whether the strcmp gets inlined or not)

Linus Torvalds (2):
Add new streams to a hash-list based on their names Teach 'already_tokenized()' to use the stream name hash table

 pre-process.c |    8 +++++---
 token.h       |    3 ++-
 tokenize.c    |   25 ++++++++++++++++++++++++-
 3 files changed, 31 insertions(+), 5 deletions(-)
Signature · 1 line
1.7.5.rc1.1.gc3f61.dirty