[ADT] Add a single-character version of the small vector split routine
authorChandler Carruth <chandlerc@gmail.com>
Thu, 10 Sep 2015 06:07:03 +0000 (06:07 +0000)
committerChandler Carruth <chandlerc@gmail.com>
Thu, 10 Sep 2015 06:07:03 +0000 (06:07 +0000)
commit82c835626fc509771e3927e2ca4886cf0f4245db
tree5e7922ec965ac2f3856790266be9f64249167b41
parente7a8fe1967f295129b3118b1bc8a5cc210dcd528
[ADT] Add a single-character version of the small vector split routine
on StringRef. Finding and splitting on a single character is
substantially faster than doing it on even a single character StringRef
-- we immediately get to a *very* tuned memchr call this way.

Even nicer, we get to this even in a debug build, shaving 18% off the
runtime of TripleTest.Normalization, helping PR23676 some more.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@247244 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/ADT/StringRef.h
lib/Support/StringRef.cpp
lib/Support/Triple.cpp
unittests/ADT/StringRefTest.cpp