aoc VS hashbrown

Compare aoc vs hashbrown and see what are their differences.


πŸŽ„ My solutions and walkthroughs for Advent of Code ( and more related stuff. (by mebeim)


Rust port of Google's SwissTable hash map (by rust-lang)
Our great sponsors
  • SonarQube - Static code analysis for 29 languages.
  • Scout APM - Less time debugging, more time building
  • SaaSHub - Software Alternatives and Reviews
aoc hashbrown
12 11
257 1,622
- 3.1%
8.4 7.2
6 days ago 4 days ago
Python Rust
GNU General Public License v3.0 or later GNU General Public License v3.0 or later
The number of mentions indicates the total number of mentions that we've tracked plus the number of user suggested alternatives.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.


Posts with mentions or reviews of aoc. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2021-12-23.


Posts with mentions or reviews of hashbrown. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2022-02-01.
  • Representing struct fields with negative offsets
    1 project | | 23 May 2022
    Also this idea can also be used to represent two variable-sized arrays of different types with a single pointer:
  • Rust/cargo environment seems as ridiculous as JS/npm, no?
    1 project | | 15 May 2022
    Some of this is in the standard library now. For example, hashbrown was integrated into std in Rust 1.36, though the crate still exists seperately and is maintained by the rust organization.
  • Announcing Leapfrog, a faster concurrent HashMap
    4 projects | | 1 Feb 2022
    I'd be interested in seeing the results for
  • Hey Rustaceans! Got an easy question? Ask here (4/2022)!
    8 projects | | 24 Jan 2022
    std’s HashMap and HashSet are available as no_std library, the std just imports those and wraps around them
  • Slitter: A slab allocator that trusts, but verifies
    4 projects | | 4 Aug 2021
    I'm working on a memory profiler for Python that is fast enough to run in production (see link below), so I've ended up with some similar problems re performance and importance of testing.

    A few things the article talks about where one can maybe do even better:

    1. likely()/unlikely() not being in stable Rust. This is true, but the hashbrown project has some hacked-up variants it claims work on stable:

    2. Rust not having fast thread locals. Same problem for me, so likewise did it in C with "initial-exec". But! If you use clang, you can get LTO across C and Rust, so you can get fast thread locals _and_ not have function call overhead. Basically need to use same version of Clang as Rust does (12 at the moment) and do a little song and dance in linker and compiler flags. See

    3. For testing these sort of things, being able to assert "this test touched this code path" is extremely useful. In my case, for example, I have different code paths for sampled and unsampled allocations, but from perspective of code calling malloc() everything should be identical. So how to tell if correct code path was used? Coverage marks are a great solution for this:

    (The Python profiler, if anyone is interested: I've already released an open source memory profiler that tracks all allocations, Unlike most memory profilers it tells you source-of-allocations at peak memory, which is key for data processing applications. The commercial production-grade version I'm not working on uses sampling, and will be even more focused on data processing batch applications; the goal is to have essentially no performance overhead so it can always be on.)

  • What's everyone working on this week (19/2021)?
    15 projects | | 9 May 2021
    Hey, I have finished a basic version of my uell library, will take a little bit more time to document and publish it. Thank you for your blog post. I also looked at your tantivy-stacker crate, a bit more complex as it also contains a HashMap and a MemoryPool. I chose to use the bumpalo crate along with the hashbrown crate, without specifying restriction on which of the map or the linked-list must grow more, dumping when the Bump reaches the threshold.
  • Hey Rustaceans! Got an easy question? Ask here (16/2021)!
    15 projects | | 19 Apr 2021
    As I understand it, Rust changed its HashMap implementation to hashbrown after that article was written.
  • 76% Faster CPython
    9 projects | | 30 Mar 2021
    Google spent literal money paying Matt Kulukundis to improve hash table performance. Now it's literally the built-in hash table for Rust.
  • Concatenating arrays at compile-time in Rust 1.51! (Currently available in Beta)
    1 project | | 7 Mar 2021
    Don't take my word for it, though. Instead, have a look at the work that Marwes has been doing on hashbrown starting with this PR. It seems counter-intuitive that de-monomorphizing the internals of a HashMap, with a look-up done in under 6ns, would lead to better performance, no? The key insight, though, is that there are many various instantiations of the HashMap:
  • Unit Struct usage
    1 project | | 18 Feb 2021
    A HashSet is just a HashMap with value type being (). (linking to hashbrown, since std currently just wraps this crate).

What are some alternatives?

When comparing aoc and hashbrown you can also consider the following projects:

meow_hash - Official version of the Meow hash, an extremely fast level 1 hash

moonfire-nvr - Moonfire NVR, a security camera network video recorder

flamegraph - Easy flamegraphs for Rust projects and everything else, without Perl or pipes <3

bumpalo - A fast bump allocation arena for Rust

cpython - The Python programming language

xxHash - Extremely fast non-cryptographic hash algorithm

aoc-2020 - My solutions for

Advent-of-Code - C# solutions for Advent of Code puzzles

aoc-2020 - Advent of Code 2020

dashmap - Blazing fast concurrent HashMap for Rust.

AoC - my personal repo for the advent of code yearly challenge

CPython - The Python programming language