one more simple folly::join optimization
authorPhilip Pronin <philipp@fb.com>
Fri, 17 Aug 2012 23:21:26 +0000 (16:21 -0700)
committerTudor Bosman <tudorb@fb.com>
Sun, 26 Aug 2012 18:13:46 +0000 (11:13 -0700)
commit5df0c9714e235fc704cfd03aea833fe8163d0058
tree10b4245c2a2d59d461bd4c60e4240128df7c6b57
parentff25e3b55ba9380c0eb2bc2b3c6b6397e2ba663b
one more simple folly::join optimization

Summary:
Before:

_bin/folly/test/string_test --benchmark --bm_regex=join --bm_min_usec=1000000
============================================================================
folly/test/StringTest.cpp                       relative  time/iter  iters/s
============================================================================
joinCharStr                                                  3.59us  278.29K
joinStrStr                                                   4.44us  225.09K
joinInt                                                     10.55us   94.76K
============================================================================

And after:

_bin/folly/test/string_test --benchmark --bm_regex=join --bm_min_usec=1000000
============================================================================
folly/test/StringTest.cpp                       relative  time/iter  iters/s
============================================================================
joinCharStr                                                  3.61us  277.01K
joinStrStr                                                   3.77us  264.97K
joinInt                                                      9.92us  100.81K
============================================================================

Test Plan: unittests, benchmark

Reviewed By: tudorb@fb.com

FB internal diff: D552364
folly/String-inl.h
folly/test/StringTest.cpp