| Commit message (Collapse) | Author | Age |
| |
|
|
|
|
|
| |
PiperOrigin-RevId: 478050535
Change-Id: I8e4a4b01aceb8d712476101633eac0ce8647823a
|
|\
| |
| |
| |
| | |
PiperOrigin-RevId: 478009291
Change-Id: I136dffd1383e42ae499c318132e9d789f3a859b9
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The current implementation correctly copies up to 15 bytes of data, but the nullify code clears up to 16 bytes, which was likely motivated by the assumption that the length indicator is always the last byte.
This changes limits the nullify to 15 bytes as well removing this layout specific assumption from cord.h, making future platform specific internal layout changes easier to land.
PiperOrigin-RevId: 477997741
Change-Id: Idcdfeca2a005139f97eafcc77111542d90b817af
|
| |
| |
| |
| |
| |
| |
| | |
This removes layout specific details from InlineData from cord.cc, making future platform specific internal layout changes easier to land.
PiperOrigin-RevId: 477870559
Change-Id: I26e428ef280d593ad321cf7875e05adcb1cb6438
|
| |
| |
| |
| |
| |
| |
| | |
This removes layout specific details from InlineData from cord.h, making future platform specific internal layout changes easier to land.
PiperOrigin-RevId: 477869206
Change-Id: I1d417af47d7f04e34a98ba7b93ae591ece8f9151
|
|/ |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Half-open intervals are recommended by Dijkstra:
https://www.cs.utexas.edu/users/EWD/transcriptions/EWD08xx/EWD831.html
This also simplifies a static_assert by removing a +1 term.
Also fix a "smaller exponent" copy/pasto.
PiperOrigin-RevId: 477848998
Change-Id: I67af73d37ac08d36a1117ba33313a02932bd5814
|
|
|
|
|
|
|
| |
This makes future platform specific internal layout changes easier to land.
PiperOrigin-RevId: 477843948
Change-Id: I4ca4fdea5e965261c029d08319aba0290721c227
|
|
|
|
|
| |
PiperOrigin-RevId: 477811281
Change-Id: Iba838e0eaceb5e6bfe1dac496fc86a22f5cf31d5
|
|
|
|
|
|
|
|
|
| |
In particular:
* point to LOG mutator methods that can affect their values
* point out lifetime hazards with ABSL_ATTRIBUTE_LIFETIME_BOUND
PiperOrigin-RevId: 477725823
Change-Id: I38cb434b300ceea3cceb2c42eb406bba8e1049d4
|
|
|
|
|
| |
PiperOrigin-RevId: 477587157
Change-Id: I4527b891222a011f8c1788387479bdc8e4a3bb94
|
|
|
|
|
|
|
| |
interrupts to `read`
PiperOrigin-RevId: 477547252
Change-Id: Icc94290511b5071d15584d59dcd9cf6ad7319e2b
|
|
|
|
|
| |
PiperOrigin-RevId: 477507777
Change-Id: I5ecde3163ca560ac8774034e55654774e36ad230
|
|
|
|
|
|
|
|
|
|
| |
between raw_hash_set and btree.
Also remove the transfer implementations from btree_set.h and flat_hash_set.h, which are equivalent to the default implementations.
Motivation: this will simplify upcoming changes related to trivial relocation.
PiperOrigin-RevId: 477493403
Change-Id: I75babef4c93dec3a8105f86c58af54199bb1ec9c
|
|
|
|
|
| |
PiperOrigin-RevId: 477043101
Change-Id: I009ea39ad61e7e78cdac51afc57a8ad5b4d8aa2d
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
| |
PiperOrigin-RevId: 476742468
Change-Id: I99267ad1194b119b59f341ef5044c8836de5bf0e
|
|
|
|
|
|
|
| |
values. Note that %v prints bool values as "true" and "false" rather than "1" and "0".
PiperOrigin-RevId: 475651689
Change-Id: I24b3749d85b5bb7cbc18653d629271a8b2b07d08
|
|
|
|
|
|
|
| |
flags and other stream properties.
PiperOrigin-RevId: 475643360
Change-Id: I061c167da8e45f79c2487f172190adb0177a6c10
|
|
|
|
|
| |
PiperOrigin-RevId: 475636693
Change-Id: Idb7c2b9c36ad8e59f24ff7df179a207d301d9e89
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
absl::is_trivially_relocatable - and move it from optimization.h to type_traits.h.
Example of how to change to the new type trait:
```
#include "absl/base/attributes.h"
if (ABSL_IS_TRIVIALLY_RELOCATABLE(T)) { DoSomething(); }
```
to
```
#include "absl/meta/type_traits.h"
if (absl::is_trivially_relocatable<T>::value) { DoSomething(); }
```
Note that optimization.h is also built in C mode so we can't put a type trait there.
PiperOrigin-RevId: 475633715
Change-Id: I2bc85f3f6711d1280049fd01eb97c497d2d0d929
|
|
|
|
|
| |
PiperOrigin-RevId: 475601161
Change-Id: I3f67a1597ddfa6de60f19fe4b38d44fbc5630bd8
|
|
|
|
|
|
|
|
|
|
|
|
| |
The btree data structure poisons regions of memory it's not using. It leaves
these regions poisoned when it frees memory. This means that a custom memory
allocator that tries to reuse freed memory will trigger an ASAN
use-after-poison error.
The fix is to unpoison each memory region right before freeing it.
PiperOrigin-RevId: 475309671
Change-Id: I29d55c298d3d89a83e1f960deb6e93118891ff83
|
|
|
|
|
|
|
| |
it up-to-date going forward.
PiperOrigin-RevId: 475272267
Change-Id: I3adfabc436c539b57a488aec4ff8760c6ed19447
|
|
|
|
|
| |
PiperOrigin-RevId: 474916555
Change-Id: Ie6fc9186006280e4db3730ea67c2d99b6faff121
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
`BM_Iteration` separately.
```
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
| |
In Android builds this library calls __android_log_write directly, and so needs this linker dep.
PiperOrigin-RevId: 474080654
Change-Id: I19f6ac4f78e635541ccad08ec9e553adfe609b3f
|
|
|
|
|
| |
PiperOrigin-RevId: 474060540
Change-Id: Ie0f24dfa6ec724eaa9eca82de5f73bbd8d622e38
|
|
|
|
|
| |
PiperOrigin-RevId: 474043469
Change-Id: I9ea33a8bf026263c9e10d2a183014a5ee8df1306
|
|
|
|
|
| |
PiperOrigin-RevId: 474017481
Change-Id: I1be222fa38ad01f6ddbcddd610f9629fd4888777
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
| |
PiperOrigin-RevId: 473088472
Change-Id: If4fb8354490821cbaf53743f51bf0b0d2ba85895
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
instead of just detecting Bazel's default "compiler" string.
When Bazel auto-configures GCC, it sets the compiler string to
"compiler", probably for backwards compatibility. Some users manually
set the string to "gcc".
This should address the backwards compatibility issues described in
https://github.com/bazelbuild/bazel/issues/12707 and hopefully fix
https://github.com/abseil/abseil-cpp/issues/1263
PiperOrigin-RevId: 473069817
Change-Id: I8a24721f63f9d61447b22b3b05b06a9dde7d34d8
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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 tests.)
Bug: chromium:1292951
PiperOrigin-RevId: 473055916
Change-Id: I40cdd6c87ba9d0a5fb2db5746cff04f14ee829c2
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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 miscellaneous non-test source files.)
Bug: chromium:1292951
PiperOrigin-RevId: 473054605
Change-Id: Ifd7b24966613ca915511a3a607095508068200b8
|
|
|
|
|
|
|
| |
Fixes #1275
PiperOrigin-RevId: 472990940
Change-Id: I1251b01b09e6a9baac52ae4df443714432115e90
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
internal/stacktrace_x86-inl.inc includes internal/raw_logging.h and therefore needs
a direct dependency to satisfy Bazel layering_check (Clang -fmodules-strict-decluse).
Clang before https://reviews.llvm.org/D132779 does not report the issue becasue:
* internal/stacktrace_x86-inl.inc is an .inc file and is not checked as a main file
* internal/stacktrace_x86-inl.inc is a textual header and older Clang incorrectly
considers there is no requesting module and suppresses the error.
PiperOrigin-RevId: 472795469
Change-Id: Ia4ad667ea80b2590cef1adfd22af025c8df826ac
|
|
|
|
|
|
|
|
| |
This is the current minimum according to
https://github.com/google/oss-policies-info/blob/main/foundational-cxx-support-matrix.md
PiperOrigin-RevId: 472714045
Change-Id: I5930bbbc4eec4644d22bba703957d1764c2e76be
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Change `absl/base/options.h` at install time to reflect the ABI used
to compile the libraries, i.e., if Abseil was compiled with
C++ >= 17 then the `ABSL_OPTION_USE_STD_*` macros are set to `1`,
because then the C++ 17 types are embedded in the ABI of the installed
artifacts.
Likewise, set the `target_compile_features()` of Abseil libraries
to reflect the C++ version used to compile them. If they the Abseil
libraries are compiled with C++ >= 17, then all downstream
dependencies must also be compiled with C++ >= 17.
Fixes #696
PiperOrigin-RevId: 472538165
Change-Id: Ic9e346ebe277c882a18ad96e1918c9e3511c91c3
|
|
|
|
|
|
|
| |
to work with modifiers because the meaning of modifiers is type-dependent and `%v` is intended to be used in situations where the type is not important. Please continue using if `%s` if you require format modifiers.
PiperOrigin-RevId: 472534916
Change-Id: I5838761b2b40cbc4344077f23d44b1e634e5bae3
|
|
|
|
|
| |
PiperOrigin-RevId: 472521745
Change-Id: Ia76cd720d1036dce05f6332f41a2ff748b3ea971
|
|\
| |
| |
| |
| | |
PiperOrigin-RevId: 472457798
Change-Id: I4abb971c9bb19cc1a1968525cebf473e41738768
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
In some cases we can do a bit better by using
std::min(std::numeric_limits<size_type>::max() / 2, allocator<T>::max_size())
They may help in some cases, particularly on 32-bit platforms.
PiperOrigin-RevId: 471846886
Change-Id: I5bd63de5dd8aec3de6530a33d8904dd6e9bd015e
|
| |
| |
| |
| |
| | |
PiperOrigin-RevId: 471833563
Change-Id: Ida281308afab67e73b2da61418e82b22c2110ef9
|