Benchmark std::to_string vs. folly::to<std::string>
Summary: We wanted to compare the benefits of using folly::to<std::string> directly, and decided this benchmarking might as well be contributed back to folly. Here are the results:
```
============================================================================
folly/test/ConvTest.cpp relative time/iter iters/s
============================================================================
...
----------------------------------------------------------------------------
u64ToStringClibMeasure(1) 157.88ns 6.33M
u64ToStringFollyMeasure(1) 212.52% 74.29ns 13.46M
----------------------------------------------------------------------------
u64ToStringClibMeasure(12) 158.14ns 6.32M
u64ToStringFollyMeasure(12) 212.55% 74.40ns 13.44M
----------------------------------------------------------------------------
u64ToStringClibMeasure(123) 152.26ns 6.57M
u64ToStringFollyMeasure(123) 210.95% 72.18ns 13.85M
----------------------------------------------------------------------------
u64ToStringClibMeasure(1234) 152.40ns 6.56M
u64ToStringFollyMeasure(1234) 204.82% 74.41ns 13.44M
----------------------------------------------------------------------------
u64ToStringClibMeasure(12345) 156.01ns 6.41M
u64ToStringFollyMeasure(12345) 208.90% 74.68ns 13.39M
----------------------------------------------------------------------------
u64ToStringClibMeasure(123456) 178.21ns 5.61M
u64ToStringFollyMeasure(123456) 238.77% 74.63ns 13.40M
----------------------------------------------------------------------------
u64ToStringClibMeasure(
1234567) 161.38ns 6.20M
u64ToStringFollyMeasure(
1234567) 203.09% 79.46ns 12.58M
----------------------------------------------------------------------------
u64ToStringClibMeasure(
12345678) 159.01ns 6.29M
u64ToStringFollyMeasure(
12345678) 192.42% 82.64ns 12.10M
----------------------------------------------------------------------------
u64ToStringClibMeasure(
123456789) 169.07ns 5.91M
u64ToStringFollyMeasure(
123456789) 203.70% 83.00ns 12.05M
----------------------------------------------------------------------------
u64ToStringClibMeasure(
1234567890) 166.56ns 6.00M
u64ToStringFollyMeasure(
1234567890) 187.21% 88.97ns 11.24M
----------------------------------------------------------------------------
u64ToStringClibMeasure(
12345678901) 176.22ns 5.67M
u64ToStringFollyMeasure(
12345678901) 197.57% 89.20ns 11.21M
----------------------------------------------------------------------------
u64ToStringClibMeasure(
123456789012) 174.74ns 5.72M
u64ToStringFollyMeasure(
123456789012) 182.52% 95.74ns 10.45M
----------------------------------------------------------------------------
u64ToStringClibMeasure(
1234567890123) 178.47ns 5.60M
u64ToStringFollyMeasure(
1234567890123) 186.81% 95.54ns 10.47M
----------------------------------------------------------------------------
u64ToStringClibMeasure(
12345678901234) 187.33ns 5.34M
u64ToStringFollyMeasure(
12345678901234) 184.05% 101.78ns 9.82M
----------------------------------------------------------------------------
u64ToStringClibMeasure(
123456789012345) 198.16ns 5.05M
u64ToStringFollyMeasure(
123456789012345) 182.48% 108.59ns 9.21M
----------------------------------------------------------------------------
u64ToStringClibMeasure(
1234567890123456) 182.56ns 5.48M
u64ToStringFollyMeasure(
1234567890123456) 164.19% 111.19ns 8.99M
----------------------------------------------------------------------------
u64ToStringClibMeasure(
12345678901234567) 186.80ns 5.35M
u64ToStringFollyMeasure(
12345678901234567) 162.33% 115.07ns 8.69M
----------------------------------------------------------------------------
u64ToStringClibMeasure(
123456789012345678) 195.08ns 5.13M
u64ToStringFollyMeasure(
123456789012345678) 165.51% 117.87ns 8.48M
----------------------------------------------------------------------------
u64ToStringClibMeasure(
1234567890123456789) 200.27ns 4.99M
u64ToStringFollyMeasure(
1234567890123456789) 164.62% 121.65ns 8.22M
----------------------------------------------------------------------------
u64ToStringClibMeasure(12345678901234567890U) 203.18ns 4.92M
u64ToStringFollyMeasure(12345678901234567890U) 162.38% 125.13ns 7.99M
----------------------------------------------------------------------------
...
============================================================================
```
Reviewed By: yfeldblum
Differential Revision:
D2680998
fb-gh-sync-id:
179fbd756c714c92b7230d3750af024865ecbb0a