More benchmarks.

Add a hand-rolled maps line parser as something to compare our realistic
sscanf benchmark against. Also add benchmarks for the ato*/strto* family.

This patch doesn't fix the tests, which seem to have been broken by
the recent google-benchmark upgrade despite the benchmarks themselves
all working just fine. To me that's a final strike against these tests
which are hard to maintain and not obviously useful, but we can worry
about what to do with them -- whether to just delete them or to try to
turn them into tests that actually have some value -- in a separate CL.

Bug: N/A
Test: ran benchmarks
Change-Id: I6c9a77ece98d624baeb049b360876ef5c35ea7f2
diff --git a/benchmarks/stdlib_benchmark.cpp b/benchmarks/stdlib_benchmark.cpp
index 0bee683..24773de 100644
--- a/benchmarks/stdlib_benchmark.cpp
+++ b/benchmarks/stdlib_benchmark.cpp
@@ -118,3 +118,45 @@
   state.SetBytesProcessed(uint64_t(state.iterations()) * uint64_t(500000));
 }
 BIONIC_BENCHMARK_WITH_ARG(BM_stdlib_mbrtowc, "0");
+
+void BM_stdlib_atoi(benchmark::State& state) {
+  while (state.KeepRunning()) {
+    benchmark::DoNotOptimize(atoi(" -123"));
+  }
+}
+BIONIC_BENCHMARK(BM_stdlib_atoi);
+
+void BM_stdlib_atol(benchmark::State& state) {
+  while (state.KeepRunning()) {
+    benchmark::DoNotOptimize(atol(" -123"));
+  }
+}
+BIONIC_BENCHMARK(BM_stdlib_atol);
+
+void BM_stdlib_strtol(benchmark::State& state) {
+  while (state.KeepRunning()) {
+    benchmark::DoNotOptimize(strtol(" -123", nullptr, 0));
+  }
+}
+BIONIC_BENCHMARK(BM_stdlib_strtol);
+
+void BM_stdlib_strtoll(benchmark::State& state) {
+  while (state.KeepRunning()) {
+    benchmark::DoNotOptimize(strtoll(" -123", nullptr, 0));
+  }
+}
+BIONIC_BENCHMARK(BM_stdlib_strtoll);
+
+void BM_stdlib_strtoul(benchmark::State& state) {
+  while (state.KeepRunning()) {
+    benchmark::DoNotOptimize(strtoul(" -123", nullptr, 0));
+  }
+}
+BIONIC_BENCHMARK(BM_stdlib_strtoul);
+
+void BM_stdlib_strtoull(benchmark::State& state) {
+  while (state.KeepRunning()) {
+    benchmark::DoNotOptimize(strtoull(" -123", nullptr, 0));
+  }
+}
+BIONIC_BENCHMARK(BM_stdlib_strtoull);