1. 27 Sep, 2022 1 commit
  2. 26 Sep, 2022 2 commits
    • Fix -Wimplicit-int-conversion and -Wsign-conversion warnings in btree. · 1cd88976
      Certain core libraries in Chrome build with these warnings [1];
      btree_map and btree_set cannot be used in those libraries until these
      warnings are fixed.
      
      [1] https://crbug.com/1292951
      
      PiperOrigin-RevId: 476908396
      Change-Id: I32e9ea1eec911e329d6ff00f04fa2e9cfde8660a
      Abseil Team committed
    • Implement Eisel-Lemire for from_chars<float> · 7f9c536c
      This does for float what a recent commit did for double.
      
      Median of 5 runs of "time atod_manual_test pnftd/data/*.txt"
      user    0m0.730s  # Before
      user    0m0.701s  # After (a speed-up of 1.04x)
      where pnftd is https://github.com/nigeltao/parse-number-fxx-test-data
      
      Part of the reason why this speed-up of 1.04x isn't as dramatic as for
      the from_chars<double> change is that, out of the 5299993 pnftd test
      cases, 76.42% produce result_out_of_range for single precision (compared
      to 1.03% for double precision).
      
      "benchy --reference=srcfs --benchmark_filter='SimpleAtof' :numbers_benchmark"
      output (which uses deterministic but randomly generated input strings):
      name                                    old cpu/op  new cpu/op  delta
      BM_SimpleAtof<absl::string_view>/10/1   392ns ± 2%   323ns ± 3%  -17.60%  (p=0.000 n=48+48)
      BM_SimpleAtof<absl::string_view>/10/2   426ns ± 3%   311ns ± 4%  -26.89%  (p=0.000 n=59+49)
      BM_SimpleAtof<absl::string_view>/10/4   435ns ± 3%   341ns ± 3%  -21.68%  (p=0.000 n=58+48)
      BM_SimpleAtof<absl::string_view>/10/8   501ns ± 3%   393ns ± 3%  -21.55%  (p=0.000 n=60+50)
      BM_SimpleAtof<const char*>/10/1         409ns ± 6%   339ns ± 3%  -17.06%  (p=0.000 n=48+49)
      BM_SimpleAtof<const char*>/10/2         412ns ± 4%   347ns ± 3%  -15.82%  (p=0.000 n=47+49)
      BM_SimpleAtof<const char*>/10/4         463ns ± 6%   369ns ± 6%  -20.37%  (p=0.000 n=60+50)
      BM_SimpleAtof<const char*>/10/8         548ns ± 3%   450ns ± 4%  -17.91%  (p=0.000 n=57+59)
      BM_SimpleAtof<std::string>/10/1         386ns ± 2%   325ns ± 3%  -15.74%  (p=0.000 n=48+50)
      BM_SimpleAtof<std::string>/10/2         425ns ± 3%   311ns ± 4%  -26.79%  (p=0.000 n=60+50)
      BM_SimpleAtof<std::string>/10/4         435ns ± 4%   340ns ± 3%  -21.94%  (p=0.000 n=59+49)
      BM_SimpleAtof<std::string>/10/8         503ns ± 4%   398ns ± 2%  -20.89%  (p=0.000 n=59+48)
      
      PiperOrigin-RevId: 476880111
      Change-Id: Ibc5583677ac2ed338d09d8db960ae8a513eb2ccb
      Abseil Team committed
  3. 25 Sep, 2022 1 commit
  4. 20 Sep, 2022 5 commits
  5. 19 Sep, 2022 2 commits
  6. 16 Sep, 2022 1 commit
  7. 15 Sep, 2022 1 commit
    • Adds support for "%v" in absl::StrFormat and related functions for numeric… · ab2e2c4f
      Adds support for "%v" in absl::StrFormat and related functions for numeric types, including integer and floating point values. Users may now specify %v and have the format specifier deduced. Integer values will print according to %d specifications, unsigned values will use %u, and floating point values will use %g. Note that %v does not work for `char` due to ambiguity regarding the intended output. Please continue to use %c for `char`.
      
      PiperOrigin-RevId: 474658166
      Change-Id: Iecae39263e368b27232db440535f2bf7da8d863c
      Abseil Team committed
  8. 14 Sep, 2022 4 commits
    • Implement correct move constructor and assignment for… · d423ac0e
      Implement correct move constructor and assignment for absl::strings_internal::OStringStream, and mark that class final.
      
      This should be explicit per https://google.github.io/styleguide/cppguide.html#Copyable_Movable_Types, and is currently hard to infer due to multiple inheritance.
      
      PiperOrigin-RevId: 474311032
      Change-Id: I72d7adcb9f7a991c19c26bc7083a4df31de5da49
      Andy Getzendanner committed
    • Add more options for `BM_iteration` in order to see better picture for choosing… · 4832049e
      Add more options for `BM_iteration` in order to see better picture for choosing trade off for iteration optimizations.
      
      ```
      BM_Iteration/1/1      1.83ns ± 0%
      BM_Iteration/2/2      2.63ns ±11%
      BM_Iteration/4/4      5.76ns ±26%
      BM_Iteration/7/7      3.79ns ± 0%
      BM_Iteration/10/10    8.49ns ±23%
      BM_Iteration/15/15    18.2ns ±30%
      BM_Iteration/16/16    21.2ns ±29%
      BM_Iteration/54/54    37.2ns ±21%
      BM_Iteration/100/100  74.7ns ±13%
      BM_Iteration/400/400   330ns ± 8%
      BM_Iteration/0/0      0.46ns ± 2%
      BM_Iteration/10/0     1.26ns ± 1%
      BM_Iteration/100/0    13.4ns ± 0%
      BM_Iteration/1000/0    417ns ± 0%
      BM_Iteration/10000/0  3.30µs ± 0%
      BM_Iteration/100/1    16.0ns ±12%
      BM_Iteration/1000/10   453ns ± 5%
      ```
      
      PiperOrigin-RevId: 474282700
      Change-Id: I4b3fcb80292147aa4a8f542ae5c7fc1e8bd5f05b
      Abseil Team committed
    • Change `EndComparison` benchmark to not measure iteration. Also added `BM_Iteration` separately. · 1be36c8a
      ```
      BM_EndComparison  0.46ns ± 0%
      
      BM_Iteration/10/10    8.09ns ± 7%
      BM_Iteration/20/20    18.6ns ±16%
      BM_Iteration/100/100  79.0ns ±15%
      BM_Iteration/400/400   344ns ± 5%
      BM_Iteration/100/1    16.6ns ± 1%
      BM_Iteration/1000/10   454ns ± 3%
      ```
      
      PiperOrigin-RevId: 474211728
      Change-Id: I9bd799a4be3247ca8f2a2144b6e857db8c99c81f
      Abseil Team committed
    • Implement Eisel-Lemire for from_chars<double> · dc6109e0
      Eisel-Lemire is a fast Atod algorithm, discussed at
      https://nigeltao.github.io/blog/2020/eisel-lemire.html
      
      Median of 5 runs of "time atod_manual_test pnftd/data/*.txt"
      user    0m1.477s  # Before
      user    0m0.746s  # After (a speed-up of 1.98x)
      where pnftd is https://github.com/nigeltao/parse-number-fxx-test-data
      
      "benchy --reference=srcfs --benchmark_filter='SimpleAtod' :numbers_benchmark"
      output (which uses deterministic but randomly generated input strings):
      name                                    old cpu/op  new cpu/op  delta
      BM_SimpleAtod<absl::string_view>/10/1   388ns ± 3%   330ns ± 2%  -15.06%  (p=0.000 n=49+44)
      BM_SimpleAtod<absl::string_view>/10/2   428ns ± 3%   320ns ± 2%  -25.07%  (p=0.000 n=59+49)
      BM_SimpleAtod<absl::string_view>/10/4   431ns ± 3%   353ns ± 4%  -18.04%  (p=0.000 n=59+48)
      BM_SimpleAtod<absl::string_view>/10/8   512ns ± 3%   409ns ± 4%  -20.18%  (p=0.000 n=60+56)
      BM_SimpleAtod<const char*>/10/1         411ns ± 4%   341ns ± 3%  -17.15%  (p=0.000 n=51+49)
      BM_SimpleAtod<const char*>/10/2         431ns ± 3%   356ns ± 2%  -17.44%  (p=0.000 n=58+48)
      BM_SimpleAtod<const char*>/10/4         437ns ± 3%   378ns ± 4%  -13.49%  (p=0.000 n=60+50)
      BM_SimpleAtod<const char*>/10/8         552ns ± 2%   450ns ± 4%  -18.43%  (p=0.000 n=59+59)
      BM_SimpleAtod<std::string>/10/1         404ns ± 2%   328ns ± 2%  -18.78%  (p=0.000 n=48+49)
      BM_SimpleAtod<std::string>/10/2         438ns ± 3%   321ns ± 3%  -26.81%  (p=0.000 n=60+50)
      BM_SimpleAtod<std::string>/10/4         446ns ± 2%   354ns ± 3%  -20.66%  (p=0.000 n=59+50)
      BM_SimpleAtod<std::string>/10/8         519ns ± 2%   410ns ± 4%  -21.07%  (p=0.000 n=59+50)
      
      sizeof(kPower10MantissaTable) doubles from 5208 to 10416 bytes.
      
      PiperOrigin-RevId: 474174891
      Change-Id: Iea6f6569419b6b55ab5978994f0adb1f4a8aafb2
      Abseil Team committed
  9. 13 Sep, 2022 4 commits
  10. 12 Sep, 2022 1 commit
    • Fix "unsafe narrowing" warnings in absl, 8/n. · 5a547f8b
      Addresses failures with the following, in some files:
      -Wshorten-64-to-32
      -Wimplicit-int-conversion
      -Wsign-compare
      -Wsign-conversion
      -Wtautological-unsigned-zero-compare
      
      (This specific CL focuses on .cc files in */internal/.)
      
      Bug: chromium:1292951
      PiperOrigin-RevId: 473868797
      Change-Id: Ibe0b76e33f9e001d59862beaac54fb47bacd39b2
      Abseil Team committed
  11. 08 Sep, 2022 5 commits
  12. 07 Sep, 2022 2 commits
  13. 06 Sep, 2022 4 commits
  14. 02 Sep, 2022 4 commits
  15. 01 Sep, 2022 3 commits