{"slug": "abseil", "name": "Abseil", "category": "dev-libs", "category_name": "Libraries and frameworks", "description": "", "recommenders": 4, "commenters": 9, "warners": 1, "score": 3.445, "rising": -1.31, "first": "2026-01-05", "latest": "2026-06-26", "why": "b-tree maps hold multiple values per node, which makes them more cache-friendly than the red-black trees used in std::map", "why_is_quote": true, "has_verdict": false, "sentiment": {"recommend": 4, "neutral": 2, "compare": 2, "warn": 1}, "spark": [0, 0, 2, 0, 1, 1, 0, 0, 0, 0, 0, 0], "listed": true, "loved": [], "caveat": "", "short_quote": "b-tree maps hold multiple values per node, which makes them more cache-friendly than the red-black trees used in std::map", "kind": "", "icon": true, "domain": null, "github_repo": "github.com/abseil/abseil-cpp", "official_url": "https://abseil.io/", "pricing": "", "aliases": ["Abseil"], "verdict": null, "praise": [{"label": "", "summary": "", "quotes": [{"id": 766674176, "item_id": 47917136, "url": "https://news.ycombinator.com/item?id=47917136", "by": "rockwotj", "date": "2026-04-26", "version": null, "stance": "recommend", "quote": "which I thought is a neat trick", "excerpt": "Related reading is absl\u2019s linear approximation of gettime from cycle counters, which I thought is a neat trick: https://github.com/abseil/abseil-cpp/blob/351086314d46e73d430296c9eca1f6d6c0372cd1/absl/time/clock.cc#L289", "context": "", "use_case": "", "switched_from": "", "story": "The Fastest Linux Timestamps"}, {"id": 760902816, "item_id": 47556426, "url": "https://news.ycombinator.com/item?id=47556426", "by": "omoikane", "date": "2026-03-28", "version": null, "stance": "recommend", "quote": "Abseil has the convention where instead of assert(), users call", "excerpt": "assert() is meant to be compiled away if NDEBUG is defined, otherwise it shouldn't be called assert(). Given that assert() may be compiled away, it makes sense not to give it anything that has side effects. Abseil has the convention where instead of assert(), users call \"CHECK\" for checks that are guaranteed to happen at run time, or \"DCHECK\" for checks that will be compiled away when NDEBUG is defined. https://githu", "context": "", "use_case": "runtime and debug checks", "switched_from": "", "story": "C++26: A User-Friednly assert() macro"}, {"id": 744298528, "item_id": 46518658, "url": "https://news.ycombinator.com/item?id=46518658", "by": "wffurr", "date": "2026-01-06", "version": null, "stance": "recommend", "quote": "b-tree maps hold multiple values per node, which makes them more cache-friendly than the red-black trees used in std::map", "excerpt": "https://github.com/abseil/abseil-cpp/blob/master/absl/container/btree_map.h 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 a sorted associative map type, which I have not found many uses cases for in my work. I might have a handful of them versus many instances of vectors and unsorted assoc", "context": "", "use_case": "Sorted and hashed containers", "switched_from": "", "story": "High-performance header-only container library for C++23 on x86-64"}]}], "caveats": [{"label": "", "summary": "", "quotes": [{"id": 747882512, "item_id": 46742657, "url": "https://news.ycombinator.com/item?id=46742657", "by": "einpoklum", "date": "2026-01-24", "version": null, "stance": "warn", "quote": "without living in the world of abseil", "excerpt": "Indeed, the standard library maps are quite slow, and I often point that out to people: https://stackoverflow.com/a/42588384/1593077 But you can and should use non-std state-of-the-art hashmaps without living in the world of abseil.", "context": "", "use_case": "", "switched_from": "", "story": "Banned C++ Features in Chromium"}]}], "who": [], "tags": [], "use_cases": ["hash table implementation", "runtime and debug checks", "test target for analyzer", "sorted and hashed containers", "c++ utility library"], "compared": [], "makers": [], "threads": [{"url": "https://news.ycombinator.com/item?id=46464270", "title": "Lessons from Hash Table Merging", "mentions": 2}, {"url": "https://news.ycombinator.com/item?id=48692090", "title": "A C++ implementation of a fast hash map and hash set using hopscotch hashing", "mentions": 1}, {"url": "https://news.ycombinator.com/item?id=47909979", "title": "The Fastest Linux Timestamps", "mentions": 1}, {"url": "https://news.ycombinator.com/item?id=47515652", "title": "C++26: A User-Friednly assert() macro", "mentions": 1}, {"url": "https://news.ycombinator.com/item?id=47301606", "title": "Clang/LLVM static analyzer that detects microarchitectural hazards", "mentions": 1}, {"url": "https://news.ycombinator.com/item?id=46737447", "title": "Banned C++ Features in Chromium", "mentions": 1}], "sentiment_by_month": {"2025-11": {}, "2025-12": {}, "2026-01": {"recommend": 2, "compare": 2, "warn": 1}, "2026-02": {}, "2026-03": {"neutral": 1, "recommend": 1}, "2026-04": {"recommend": 1}, "2026-05": {}, "2026-06": {"neutral": 1}, "2026-07": {}, "2026-08": {}, "2026-09": {}, "2026-10": {}}, "versions": [], "version_unnamed": 0, "family_ref": null, "runs_on": null, "lines": [], "quotes": [{"id": 779097776, "item_id": 48693611, "url": "https://news.ycombinator.com/item?id=48693611", "by": "RossBencina", "date": "2026-06-26", "version": null, "stance": "neutral", "quote": "Abseil Swiss Tables carefully avoids intermediate allocations/copy constructor calls.", "excerpt": "Abseil Swiss Tables carefully avoids intermediate allocations/copy constructor calls.[1] I'd be wary about inferring underlying algorithm performance from benchmarks that don't explicitly control for these optimisations. (Or maybe everyone is using them and I'm out of touch.) [1] https://abseil.io/about/design/swisstables", "context": "", "use_case": "Hash table implementation", "switched_from": "", "story": "A C++ implementation of a fast hash map and hash set using hopscotch hashing"}, {"id": 766674176, "item_id": 47917136, "url": "https://news.ycombinator.com/item?id=47917136", "by": "rockwotj", "date": "2026-04-26", "version": null, "stance": "recommend", "quote": "which I thought is a neat trick", "excerpt": "Related reading is absl\u2019s linear approximation of gettime from cycle counters, which I thought is a neat trick: https://github.com/abseil/abseil-cpp/blob/351086314d46e73d430296c9eca1f6d6c0372cd1/absl/time/clock.cc#L289", "context": "", "use_case": "", "switched_from": "", "story": "The Fastest Linux Timestamps"}, {"id": 760902816, "item_id": 47556426, "url": "https://news.ycombinator.com/item?id=47556426", "by": "omoikane", "date": "2026-03-28", "version": null, "stance": "recommend", "quote": "Abseil has the convention where instead of assert(), users call", "excerpt": "assert() is meant to be compiled away if NDEBUG is defined, otherwise it shouldn't be called assert(). Given that assert() may be compiled away, it makes sense not to give it anything that has side effects. Abseil has the convention where instead of assert(), users call \"CHECK\" for checks that are guaranteed to happen at run time, or \"DCHECK\" for checks that will be compiled away when NDEBUG is defined. https://githu", "context": "", "use_case": "runtime and debug checks", "switched_from": "", "story": "C++26: A User-Friednly assert() macro"}, {"id": 756825713, "item_id": 47301607, "url": "https://news.ycombinator.com/item?id=47301607", "by": "yousef06", "date": "2026-03-08", "version": null, "stance": "neutral", "quote": "I ran it against Abseil.", "excerpt": "I've been building lshaz, a tool which reasons about struct field byte offsets, cache line boundaries, and atomic ordering semantics statically. The class of problems you'd find with perf c2c after the fact, caught pre-merge. The tool works, but there's a subtle detail I didn't anticipate, AST analysis alone produces the wrong answer, and in both directions. Consider a function that calls std::atomic<int>::fetch_add ", "context": "", "use_case": "test target for analyzer", "switched_from": "", "story": "Clang/LLVM static analyzer that detects microarchitectural hazards"}, {"id": 747882512, "item_id": 46742657, "url": "https://news.ycombinator.com/item?id=46742657", "by": "einpoklum", "date": "2026-01-24", "version": null, "stance": "warn", "quote": "without living in the world of abseil", "excerpt": "Indeed, the standard library maps are quite slow, and I often point that out to people: https://stackoverflow.com/a/42588384/1593077 But you can and should use non-std state-of-the-art hashmaps without living in the world of abseil.", "context": "", "use_case": "", "switched_from": "", "story": "Banned C++ Features in Chromium"}, {"id": 744728576, "item_id": 46545536, "url": "https://news.ycombinator.com/item?id=46545536", "by": "attractivechaos", "date": "2026-01-08", "version": null, "stance": "compare", "quote": "Yes, so it is with Abseil. The default rust hash functions, siphash in the standard library and foldhash in hashbrown, are ~3X as slow", "excerpt": "First of all, as khuey pointed out, the current implementation accumulates values. extend() replaces values instead. It wouldn't achieve the same functionality. I tried extend() anyway. It didn't work well. Based on your description, extend() implements a variation of preallocation (i.e. Solution II). However, because it doesn't always reserve enough space to hold the merged hash table, clustering still happens depen", "context": "", "use_case": "", "switched_from": "", "story": "Lessons from Hash Table Merging"}, {"id": 744626913, "item_id": 46539182, "url": "https://news.ycombinator.com/item?id=46539182", "by": "OskarS", "date": "2026-01-08", "version": null, "stance": "compare", "quote": "", "excerpt": "> HashMap implements Extend, so just h0.extend(h1) and you're done, the people who made your HashMap type are much better equipped to optimize this common operation. Are you sure? I'm not very used to reading Rust stdlib, but this seems to be the implementation of the default HashMap extend [1]. It just calls self.base.extend. self.base seems to be hashbrown::hash_map, and this is the source for it's extend [2]. In o", "context": "", "use_case": "", "switched_from": "", "story": "Lessons from Hash Table Merging"}, {"id": 744298528, "item_id": 46518658, "url": "https://news.ycombinator.com/item?id=46518658", "by": "wffurr", "date": "2026-01-06", "version": null, "stance": "recommend", "quote": "b-tree maps hold multiple values per node, which makes them more cache-friendly than the red-black trees used in std::map", "excerpt": "https://github.com/abseil/abseil-cpp/blob/master/absl/container/btree_map.h 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 a sorted associative map type, which I have not found many uses cases for in my work. I might have a handful of them versus many instances of vectors and unsorted assoc", "context": "", "use_case": "Sorted and hashed containers", "switched_from": "", "story": "High-performance header-only container library for C++23 on x86-64"}, {"id": 743964257, "item_id": 46497766, "url": "https://news.ycombinator.com/item?id=46497766", "by": "moogly", "date": "2026-01-05", "version": null, "stance": "recommend", "quote": "", "excerpt": "Is this similar? https://github.com/amantinband/error-or 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/statusor.h", "context": "", "use_case": "C++ utility library", "switched_from": "", "story": "Monads in C# (Part 2): Result"}]}