1. 13 Jun, 2024 1 commit
  2. 12 Jun, 2024 4 commits
  3. 11 Jun, 2024 1 commit
    • Disallow reentrance removal in `absl::erase_if`. · a0889af0
      Predicates should generally have no side effects since we do not guarantee the order or quantity for the calls.
      
      In this change we forbid one specific side effect: modification of the table we are iterating over.
      
      As a positive effect we have performance improvements (less computations and less branches).
      
      ```
      name                                          old cpu/op   new cpu/op   delta
      BM_EraseIf/num_elements:10/num_erased:0       3.02ns ± 2%  2.79ns ± 3%   -7.44%  (p=0.000 n=35+37)
      BM_EraseIf/num_elements:1000/num_erased:0     2.41ns ± 5%  2.05ns ± 4%  -14.88%  (p=0.000 n=37+37)
      BM_EraseIf/num_elements:10/num_erased:5       4.40ns ± 3%  4.22ns ± 3%   -4.19%  (p=0.000 n=37+37)
      BM_EraseIf/num_elements:1000/num_erased:500   9.16ns ± 4%  9.13ns ± 3%     ~     (p=0.307 n=37+37)
      BM_EraseIf/num_elements:10/num_erased:10      5.77ns ± 3%  5.50ns ± 4%   -4.62%  (p=0.000 n=37+37)
      BM_EraseIf/num_elements:1000/num_erased:1000  7.84ns ± 3%  7.77ns ± 3%   -0.94%  (p=0.006 n=37+35)
      
      name                                          old time/op          new time/op          delta
      BM_EraseIf/num_elements:10/num_erased:0       3.02ns ± 2%          2.79ns ± 3%   -7.48%  (p=0.000 n=35+36)
      BM_EraseIf/num_elements:1000/num_erased:0     2.41ns ± 5%          2.05ns ± 4%  -14.89%  (p=0.000 n=37+37)
      BM_EraseIf/num_elements:10/num_erased:5       4.42ns ± 3%          4.23ns ± 3%   -4.22%  (p=0.000 n=37+37)
      BM_EraseIf/num_elements:1000/num_erased:500   9.18ns ± 4%          9.15ns ± 3%     ~     (p=0.347 n=37+37)
      BM_EraseIf/num_elements:10/num_erased:10      5.79ns ± 3%          5.52ns ± 4%   -4.61%  (p=0.000 n=37+37)
      BM_EraseIf/num_elements:1000/num_erased:1000  7.87ns ± 3%          7.79ns ± 3%   -0.95%  (p=0.007 n=37+35)
      
      name                                          old INSTRUCTIONS/op  new INSTRUCTIONS/op  delta
      BM_EraseIf/num_elements:10/num_erased:0         14.9 ± 0%            12.9 ± 0%  -13.46%  (p=0.000 n=37+37)
      BM_EraseIf/num_elements:1000/num_erased:0       12.7 ± 0%            10.3 ± 0%  -18.76%  (p=0.000 n=37+37)
      BM_EraseIf/num_elements:10/num_erased:5         30.9 ± 0%            28.9 ± 0%   -6.48%  (p=0.000 n=37+37)
      BM_EraseIf/num_elements:1000/num_erased:500     37.6 ± 0%            35.3 ± 0%   -6.33%  (p=0.000 n=37+37)
      BM_EraseIf/num_elements:10/num_erased:10        46.9 ± 0%            44.9 ± 0%   -4.27%  (p=0.000 n=37+37)
      BM_EraseIf/num_elements:1000/num_erased:1000    62.6 ± 0%            60.2 ± 0%   -3.80%  (p=0.000 n=37+36)
      
      name                                          old CYCLES/op        new CYCLES/op        delta
      BM_EraseIf/num_elements:10/num_erased:0         4.91 ± 1%            4.11 ± 1%  -16.35%  (p=0.000 n=36+35)
      BM_EraseIf/num_elements:1000/num_erased:0       7.74 ± 2%            6.54 ± 2%  -15.54%  (p=0.000 n=37+37)
      BM_EraseIf/num_elements:10/num_erased:5         9.18 ± 3%            8.45 ± 3%   -7.88%  (p=0.000 n=37+35)
      BM_EraseIf/num_elements:1000/num_erased:500     29.5 ± 1%            29.3 ± 1%   -0.82%  (p=0.000 n=36+37)
      BM_EraseIf/num_elements:10/num_erased:10        13.5 ± 1%            12.6 ± 0%   -7.06%  (p=0.000 n=33+34)
      BM_EraseIf/num_elements:1000/num_erased:1000    25.1 ± 0%            24.9 ± 0%   -0.90%  (p=0.000 n=37+35)
      ```
      
      PiperOrigin-RevId: 642318040
      Change-Id: I78a4a5a9a5881db0818225f9c7c153c562009f66
      Vitaly Goldshteyn committed
  4. 10 Jun, 2024 6 commits
    • Fix implicit conversion of temporary bitgen to BitGenRef · cb319b3e
      There is no reason a temporary *shouldn't* be usable with BitGenRef (indeed, ABSL_ATTRIBUTE_LIFETIME_BOUND should catch errors) and it is useful when passing a temporary bitgen as an input argument.
      
      PiperOrigin-RevId: 642021132
      Change-Id: I03e46f5f437e40a0c6225ea1f0361475a3501513
      Abseil Team committed
    • Use `IterateOverFullSlots` in `absl::erase_if` for hash table. · 1d401d9c
      `EraseIf` itself is not very hot function, but I want to use that as demonstration of the speed of iteration via `IterateOverFullSlots`.
      
      Motivation:
      1. We are still going to save some resources.
      2. It is the first step to implement faster `absl::c_for_each` that may give larger benefits. Will require readability considerations.
      
      `BM_EraseIf/num_elements:1000/num_erased:0` is just iteration and it gives 60% speed up.
      On smaller tables  removing all elements shows 25% speed up. Note that on small tables erasing is much faster due to cl/592272653.
      
      ```
      name                                          old cpu/op   new cpu/op   delta
      BM_EraseIf/num_elements:10/num_erased:0       3.41ns ± 5%  3.03ns ± 3%  -11.14%  (p=0.000 n=37+35)
      BM_EraseIf/num_elements:1000/num_erased:0     6.06ns ± 3%  2.42ns ± 3%  -60.05%  (p=0.000 n=34+37)
      BM_EraseIf/num_elements:10/num_erased:5       5.90ns ± 3%  4.44ns ± 4%  -24.88%  (p=0.000 n=36+37)
      BM_EraseIf/num_elements:1000/num_erased:500   11.0ns ± 2%   9.2ns ± 2%  -16.60%  (p=0.000 n=35+37)
      BM_EraseIf/num_elements:10/num_erased:10      8.03ns ± 3%  5.77ns ± 2%  -28.19%  (p=0.000 n=37+37)
      BM_EraseIf/num_elements:1000/num_erased:1000  9.00ns ± 3%  7.83ns ± 2%  -12.98%  (p=0.000 n=37+37)
      
      name                                          old time/op          new time/op          delta
      BM_EraseIf/num_elements:10/num_erased:0       3.42ns ± 5%          3.04ns ± 3%  -11.13%  (p=0.000 n=37+36)
      BM_EraseIf/num_elements:1000/num_erased:0     6.07ns ± 3%          2.42ns ± 3%  -60.10%  (p=0.000 n=34+37)
      BM_EraseIf/num_elements:10/num_erased:5       5.93ns ± 3%          4.45ns ± 4%  -24.89%  (p=0.000 n=36+37)
      BM_EraseIf/num_elements:1000/num_erased:500   11.1ns ± 2%           9.2ns ± 2%  -16.61%  (p=0.000 n=35+37)
      BM_EraseIf/num_elements:10/num_erased:10      8.06ns ± 3%          5.79ns ± 2%  -28.19%  (p=0.000 n=37+37)
      BM_EraseIf/num_elements:1000/num_erased:1000  9.03ns ± 3%          7.85ns ± 2%  -12.98%  (p=0.000 n=37+37)
      
      name                                          old INSTRUCTIONS/op  new INSTRUCTIONS/op  delta
      BM_EraseIf/num_elements:10/num_erased:0         19.5 ± 1%            14.9 ± 0%  -23.79%  (p=0.000 n=37+37)
      BM_EraseIf/num_elements:1000/num_erased:0       19.9 ± 0%            12.7 ± 0%  -36.20%  (p=0.000 n=37+37)
      BM_EraseIf/num_elements:10/num_erased:5         36.9 ± 1%            30.9 ± 0%  -16.47%  (p=0.000 n=37+37)
      BM_EraseIf/num_elements:1000/num_erased:500     44.8 ± 0%            37.6 ± 0%  -16.06%  (p=0.000 n=37+37)
      BM_EraseIf/num_elements:10/num_erased:10        53.0 ± 1%            46.9 ± 0%  -11.61%  (p=0.000 n=37+37)
      BM_EraseIf/num_elements:1000/num_erased:1000    69.8 ± 0%            62.6 ± 0%  -10.32%  (p=0.000 n=36+37)
      
      name                                          old CYCLES/op        new CYCLES/op        delta
      BM_EraseIf/num_elements:10/num_erased:0         6.10 ± 7%            4.91 ± 1%  -19.49%  (p=0.000 n=37+37)
      BM_EraseIf/num_elements:1000/num_erased:0       19.4 ± 1%             7.7 ± 2%  -60.04%  (p=0.000 n=37+37)
      BM_EraseIf/num_elements:10/num_erased:5         13.9 ± 4%             9.2 ± 3%  -33.80%  (p=0.000 n=37+37)
      BM_EraseIf/num_elements:1000/num_erased:500     35.5 ± 0%            29.5 ± 1%  -16.74%  (p=0.000 n=37+37)
      BM_EraseIf/num_elements:10/num_erased:10        20.8 ± 5%            13.5 ± 0%  -35.07%  (p=0.000 n=37+30)
      BM_EraseIf/num_elements:1000/num_erased:1000    28.9 ± 0%            25.1 ± 0%  -13.06%  (p=0.000 n=37+37)
      ```
      
      PiperOrigin-RevId: 642016364
      Change-Id: I8be6af5916bd45fd110bb0398c3ffe932a6a083f
      Vitaly Goldshteyn committed
    • UTF-8 encoding library to support Rust Punycode decoding. · d30298a1
      PiperOrigin-RevId: 641983507
      Change-Id: Iad7933884aef6bfd90d159c049a1d698d19456c6
      Chris Mihelich committed
    • Disable negative NaN float ostream format checking on RISC-V · 96cdf6cc
      It’s not clear whether negative NaN floats are supposed to print as
      "-nan" or "nan" on RISC-V (https://cplusplus.github.io/LWG/issue4101).
      Until that’s resolved, don’t require that logging such a float with
      Abseil produce the same result as streaming it to an ostream does.
      
      Closes: https://github.com/abseil/abseil-cpp/issues/1684
      PiperOrigin-RevId: 641942176
      Change-Id: Iec7ef130cc15c114714f2d124cb37886b3c37ab4
      Benjamin Barenblat committed
    • PR #1689: Minor: Add missing quotes in CMake string view library definition · 2fc843ef
      Imported from GitHub PR https://github.com/abseil/abseil-cpp/pull/1689
      
      Merge c755474cd03d3da0efa68ec0605b183d24bfd5d6 into 2f61aed1
      
      Merging this change closes #1689
      
      COPYBARA_INTEGRATE_REVIEW=https://github.com/abseil/abseil-cpp/pull/1689 from rschu1ze:missing-quotes c755474cd03d3da0efa68ec0605b183d24bfd5d6
      PiperOrigin-RevId: 641896976
      Change-Id: Iaf565a13ad639543c2f1ba698aefd18f8f48bede
      Robert Schulze committed
    • Demangle template parameter object names, TA <template-arg>. · 5195c35d
      PiperOrigin-RevId: 641893938
      Change-Id: I8a21e322c9cf1d5dab7477af5367aad134fbf2ab
      Chris Mihelich committed
  5. 08 Jun, 2024 3 commits
  6. 07 Jun, 2024 6 commits
  7. 06 Jun, 2024 8 commits
  8. 05 Jun, 2024 10 commits
  9. 04 Jun, 2024 1 commit