abseil/abseil-cpp
View on GitHub ↗ ★ 18,182 C++
Abseil Common Libraries (C++)
63 mentions on Hacker News by 46 people: 3 stories, 60 comments · first 2017-09-26 · latest 2026-09-12
20082026
-
…packages in 2009[2], which was a lot back then. In 2026, Maven Central hosts over 3 million. [1]: https://github.com/abseil/abseil-cpp [2]: https://mvnrepository.com/repos/central
comment by sgammon · 2026-09-12 · in Shopify is moving from React Native back to Swift and Kotlin -
…is absl’s linear approximation of gettime from cycle counters, which I thought is a neat trick: https://github.com/abseil/abseil-cpp/blob/351086314d46e73d43...
comment by rockwotj · 2026-04-27 · in The fastest Linux timestamps -
…to happen at run time, or "DCHECK" for checks that will be compiled away when NDEBUG is defined. https://github.com/abseil/abseil-cpp/blob/0093ac6cac892086a6... https://github.com/abseil/abseil-cpp/blob/0093ac6cac892086a6...
comment by omoikane · 2026-03-28 · in C++26: A User-Friednly assert() macro -
https://github.com/abseil/abseil-cpp/blob/master/absl/contai... mentions that b-tree maps hold multiple values per node, which makes them more cache-friendly than the red-black trees used in std::map. You use either container when you want…
comment by wffurr · 2026-01-06 · in High-performance header-only container library for C++23 on x86-64 -
…What's some of the "preprocessor magic" that makes this[1] more ergonomic to use? [1]: https://github.com/abseil/abseil-cpp/blob/master/absl/status...
comment by moogly · 2026-01-05 · in Monads in C# (Part 2): Result -
…[1]. I.e. exactly what Rust's standard library `HashMap` is, also the one being tested here. [1] https://github.com/abseil/abseil-cpp/blob/23b9b75217721040f5...
comment by Voultapher · 2025-09-15 · in The unreasonable effectiveness of modern sort algorithms -
Looks similar to absl::NoDestructor https://github.com/abseil/abseil-cpp/blob/master/absl/base/n... Which is basically the only usage of std::launder I have seen
comment by rockwotj · 2025-07-19 · in C++: Zero-cost static initialization -
…`#pragma once` https://github.com/gabime/spdlog/blob/v1.x/include/spdlog/as... - `absl`: `#ifndef` https://github.com/abseil/abseil-cpp/blob/master/absl/base/a... - `zpp_bits`: `#ifndef` https://github.com/eyalz800/zpp_bits/blob/main/zpp_bi…
comment by benreesman · 2025-07-11 · in Show HN: CXXStateTree – A modern C++ library for hierarchical state machines -
A way to do the same thing that is less gross: https://github.com/abseil/abseil-cpp/blob/master/absl/cleanu...
comment by jeffbee · 2025-05-12 · in I ruined my vacation by reverse engineering WSC -
…type, and is what is used inside Google's C++ codebases (where exceptions are mostly forbidden) https://github.com/abseil/abseil-cpp/blob/master/absl/status...
comment by cmrdporcupine · 2025-05-06 · in Matt Godbolt sold me on Rust by showing me C++ -
…abseil [2] come to mind, but it's not exactly what I envision. 1: https://github.com/ETLCPP/etl 2: https://github.com/abseil/abseil-cpp
comment by w4rh4wk5 · 2025-03-25 · in Writing your own C++ standard library from scratch -
…(std::mutex, absl::base_internal::SpinLock) which might be useful to get an approximate baseline. https://github.com/abseil/abseil-cpp/blob/master/absl/synchr...
comment by vitus · 2024-10-02 · in The Fastest Mutexes -
…time I've heard of nsync, but Mike Burrows also wrote Google's production mutex implementation at https://github.com/abseil/abseil-cpp/blob/master/absl/synchr... I'm curious why this mutex implementation is absent from the author's…
comment by kccqzy · 2024-10-02 · in The Fastest Mutexes -
Their justification is here https://github.com/abseil/abseil-cpp/issues/720 However, I personally disagree with them since I think it's really important to have _some_ basic reproducibility for things like reproducing the results of a…
comment by slaymaker1907 · 2024-08-06 · in C++'s `noexcept` can sometimes help or hurt performance -
…in std::) Incremental: It does not provide a complete C++ Standard Library implementation." Abseil: https://github.com/abseil/abseil-cpp "Abseil is an open-source collection of C++ library code designed to augment the C++ standard library.…
comment by Maxatar · 2024-08-06 · in C++'s `noexcept` can sometimes help or hurt performance -
…cache line bouncing?) [1] https://github.com/rust-lang/rust/blob/master/library/alloc/... [2] https://github.com/abseil/abseil-cpp/blob/74f8c1eae915f90724... [3] https://github.com/abseil/abseil-cpp/blob/74f8c1eae915f90724...
comment by vlovich123 · 2024-06-24 · in B-Trees Require Fewer Comparisons Than Balanced Binary Search Trees -
…but there are also many corners of the codebase with, um, looser standards for code quality). [0] https://github.com/abseil/abseil-cpp/blob/bde089f/absl/time/...
comment by vitus · 2024-06-07 · in AI in software engineering at Google: Progress and the path ahead -
I've started using abseil null/no null https://www.google.com/url?sa=t&source=web&rct=j&opi=8997844... We have a linter that will try to catch cases where you didn't null check but the field is nullable
comment by 8n4vidtmkvmk · 2023-12-02 · in Is Ada safer than Rust? -
Yeah, it's nice! And Abseil does it, IFF you use LLVM libc++. https://github.com/abseil/abseil-cpp/blob/master/absl/string... The standard adopted it as resize_and_overwrite. Which I think is a little clunky.
comment by jeffbee · 2023-10-27 · in Appending to an std:string character-by-character: how does the capacity grow? -
What about something like https://github.com/abseil/abseil-cpp/blob/master/absl/string... ? ASCII lowercase can be something like auto is_upper= (x > '@') & (x < '['); return is_upper ? x+32 : x; Which boils down to add, add, cmp, cmov on…
comment by jeffbee · 2023-10-09 · in You probably shouldn't use a lookup table (2022) -
…but the C++ version also comes with good microbenchmark coverage. https://github.com/google/btree https://github.com/abseil/abseil-cpp/blob/master/absl/contai...
comment by jeffbee · 2023-09-20 · in Shaving 40% Off Google’s B-Tree Implementation with Go Generics (2022) -
…comments): https://news.ycombinator.com/item?id=36228125 Deepmind's commit to abseil: https://github.com/abseil/abseil-cpp/commit/74eee2aff683cc7d... I'm curious if any of the mimicry work has been upstreamed. I don't see any mentions in…
comment by SethTro · 2023-09-19 · in Faster Sorting Beyond DeepMind’s AlphaDev -
An implementation of call_once that accommodates callbacks that throw: https://github.com/abseil/abseil-cpp/blob/master/absl/base/c...
comment by jeffbee · 2023-08-02 · in “Once” one-time concurrent initialization with an integer -
…set for GPT-4, which was frozen sometime in March 2023. [1] https://reviews.llvm.org/D118029 [2] https://github.com/abseil/abseil-cpp/commit/74eee2aff683cc7d...
comment by beisner · 2023-06-08 · in GPT-4 “discovered” the same sorting algorithm as AlphaDev by removing “mov S P” -
…see hashing optimizations as well https://www.deepmind.com/blog/alphadev-discovers-faster-sort... , https://github.com/abseil/abseil-cpp/commit/74eee2aff683cc7d... I was one of the members who reviewed expertly what has been done both in…
comment by danlark · 2023-06-07 · in Deepmind Alphadev: Faster sorting algorithms discovered using deep RL -
And for the hashing patch this is the commit to Abseil: https://github.com/abseil/abseil-cpp/commit/74eee2aff683cc7d...
comment by andreamichi · 2023-06-07 · in Deepmind Alphadev: Faster sorting algorithms discovered using deep RL -
…be auto in this example (which becomes string_view). StripAsciiWhitespace takes a string_view here: https://github.com/abseil/abseil-cpp/blob/master/absl/string... The garbage comes from AsciiStrToUpper returning a new std::string which…
comment by hot_gril · 2023-02-28 · in Will Carbon Replace C++? -
…on the heuristics and degrees of freedom around read/write ownership, so they did it like this: https://github.com/abseil/abseil-cpp/blob/master/absl/synchr... which is quite a bit better commented/legible. If anyone reading this can do…
comment by benreesman · 2022-08-21 · in C++ Concurrency Model on x86 for Dummies (2020) -
…-- this forces it to use buckets with linked lists under the hood. Try absl::flat_hash_set ( https://github.com/abseil/abseil-cpp/blob/master/absl/contai... ) and see how it goes.
comment by bbqbbqbbq · 2022-08-09 · in A quick and practical “MSI” hash table -
…at least as far back as 2013. https://chromium.googlesource.com/chromium/src/base/+/master... https://github.com/abseil/abseil-cpp/blob/master/absl/string... https://github.com/steinwurf/boost/commits/master/boost/util... All of this is…
comment by cmrdporcupine · 2022-06-25 · in What is `Box<str>` and how is it different from `String` in Rust? -
…Side note, I was reading some Abseil code last night that did some funky bit twiddling on ARM: https://github.com/abseil/abseil-cpp/blob/master/absl/hash/i... Off the top of my head, isn’t it about 200ns [edit, not ms] to query, bus, and…
comment by e-dant · 2021-12-18 · in Matrix Multiplication Inches Closer To Mythic Goal -
I was referring to https://github.com/abseil/abseil-cpp/blob/master/absl/base/i...
comment by asdfasgasdgasdg · 2021-11-07 · in A Close Look at a Spinlock -
…too does std::function for that matter). That's the big win for things like absl's inlined_vector https://github.com/abseil/abseil-cpp/blob/master/absl/contai... It's an ABI break to add small-size optimizations to std::vector at this…
comment by kllrnohj · 2021-10-29 · in In C++, is empty() faster than comparing the size with zero? -
Probably not, since --flagfile accepts a list of filenames :-) https://github.com/abseil/abseil-cpp/blob/1ae9b71c474628d60e...
comment by yegle · 2021-10-06 · in Moving Google toward the mainline -
…of it is just mundane details. Some of it leaks out in ABSL, for example some boring trivia is at: https://github.com/abseil/abseil-cpp/blob/master/absl/base/i... They also have for years had major patches to TCP which Linux refuses to…
comment by jeffbee · 2021-10-06 · in Moving Google toward the mainline -
…default. Sadly, nothing like that is included in the standard, so won't be a lingua-franca. [1]: < https://github.com/abseil/abseil-cpp/blob/master/absl/contai... >
comment by yakubin · 2021-09-05 · in Fast Rust Builds -
…internal space for N and if needed it reallocates. Brilliant if you can arrive at a reasonable N. https://github.com/abseil/abseil-cpp/blob/master/absl/contai...
comment by jeffbee · 2021-08-14 · in Show HN: C++ virtual_vec vector implementation -
For a real battle-tested combination of spinlock and futex, see https://github.com/abseil/abseil-cpp/blob/master/absl/synchr...
comment by jeffbee · 2021-06-26 · in Correctly implementing a spinlock in Modern C++ -
…an open-source implementation of a string-like sequence as a tree of chunks, consider absl::Cord. https://github.com/abseil/abseil-cpp/blob/master/absl/string... Do read the caveats in the header comments before using it in lieu of…
comment by cbhl · 2020-10-31 · in Ropes, an Alternative to Strings [pdf] (1995) -
I suggest looking at some of Google's open sourced projects. - Abseil: https://github.com/abseil/abseil-cpp https://cs.opensource.google/abseil - Tensorflow: https://github.com/tensorflow/tensorflow/tree/master/tensorf...…
comment by kartayyar · 2020-10-28 · in Ask HN: Good C++ code bases to read? -
…that uses some modern C++ features but not the kitchen sink. Example you could start right here: https://github.com/abseil/abseil-cpp/blob/master/absl/string... LevelDB is good reading, too.
comment by jeffbee · 2020-10-28 · in Ask HN: Good C++ code bases to read? -
I'm rather proud of Abseil's implementation: https://github.com/abseil/abseil-cpp/blob/887d0eee6bab358472... As I recall another colleague wrote the original version (I do not remember who.) I bitbashed and optimized it, and added the…
comment by ahh · 2020-10-05 · in Dissecting Lemire's nearly divisionless random number generator -
…absl::from_chars, with some included benchmarks and results at the bottom of the benchmark code. https://github.com/abseil/abseil-cpp/blob/master/absl/string... ETA: I adapted the benchmark in the blog to use absl::from_chars and it's more…
comment by jeffbee · 2020-09-10 · in Parsing floats in C++: benchmarking strtod vs. from_chars -
…https://www.agner.org/optimize/vectorclass.pdf [3] https://www.youtube.com/watch?v=ncHmEUmJZf4 [4] https://github.com/abseil/abseil-cpp [5] https://github.com/questdb/questdb/blob/master/core/src/main... [6]…
comment by bluestreak · 2020-06-23 · in Show HN: Query 1.6B rows in milliseconds, live -
…Abseil library contains an open source C++ implementation of a similar structure called a Cord: https://github.com/abseil/abseil-cpp/blob/master/absl/string...
comment by klipt · 2020-06-08 · in Pain Points of Haskell -
…as part of Abseil [1] and Rust stdlib [2]. [0] https://www.youtube.com/watch?v=ncHmEUmJZf4 [1] https://github.com/abseil/abseil-cpp [2] https://github.com/rust-lang/hashbrown
comment by vthriller · 2020-03-02 · in When Bloom filters don't bloom -
…_ok_ but even there things like absl::InlinedVector are worth a strong consideration instead ( https://github.com/abseil/abseil-cpp/blob/master/absl/contai... ). Or boost's small_vector ( https://www.boost.org/doc/libs/1_60_0/doc/html/boost…
comment by kllrnohj · 2020-02-27 · in You can't make C++ not ugly, but you can't not try (2010) -
…dissatisfaction with how this turns out when people don't go as deep as the authors of Fibers did. https://github.com/abseil/abseil-cpp/issues/5
comment by m0zg · 2020-02-09 · in A hybrid thread / fiber task scheduler written in C++ 11 -
Similar to ABSL_PREDICT_FALSE: https://github.com/abseil/abseil-cpp/blob/master/absl/base/o...
comment by wffurr · 2019-11-05 · in C++ 20: The Core Language -
I believe there's a note that recommends the use of alignas when available: https://github.com/abseil/abseil-cpp/blob/fa00c321073c7ea40a...
comment by saagarjha · 2019-09-20 · in Common Systems Programming Optimizations and Tricks