rust VS mimalloc

Compare rust vs mimalloc and see what are their differences.


Empowering everyone to build reliable and efficient software. (by rust-lang)


mimalloc is a compact general purpose allocator with excellent performance. (by microsoft)
Our great sponsors
  • Revelo Payroll - Free Global Payroll designed for tech teams
  • SonarLint - Clean code begins in your IDE with SonarLint
  • InfluxDB - Collect and Analyze Billions of Data Points in Real Time
  • Onboard AI - Learn any GitHub repo in 59 seconds
rust mimalloc
2569 31
85,600 8,602
1.0% 0.9%
10.0 9.2
6 days ago 5 days ago
Rust C
GNU General Public License v3.0 or later MIT License
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 rust. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2023-09-30.
  • AdaCore Announces Gnat Pro for Rust
    2 projects | | 30 Sep 2023
  • The State of Async Rust
    9 projects | | 25 Sep 2023
    async traits are in the process of being stabilized:

    Also, impl trait projections (ability to use Self::Foo associated types in async functions in traits):

  • The Top 20 Programming Languages and Their Origins
    7 projects | | 24 Sep 2023
  • Rust & MySQL: executing MySQL stored procedures which return multiple result sets using crate sqlx.
    2 projects | | 17 Sep 2023
  • Rust & MySQL: connect, execute SQL statements and stored procs using crate sqlx.
    3 projects | | 11 Sep 2023
  • Async Rust Is A Bad Language
    11 projects | | 8 Sep 2023
    See for example and

    Basically the problem is that async blocks/fns/generators need to create a struct that holds all the local variables within them at any suspension/await/yield point. But local variables can contain references to other local variables, so there are parts of this struct that reference other parts of this struct. This creates two problems:

    - once you create such self-references you can no longer move this struct. But moving a struct is safe, so you need some unsafe code that "promises" you this won't happen. `Pin` is a witness of such promise.

    - in the memory model having an `&mut` reference to this struct means that it is the only way to access it. But this is no longer true for self referential structs, since there are other ways to access its contents, namely the fields corresponding to those local variables that reference other local variables. This is the problem that's still open.

  • 🚀 Mastering Integration Testing in Rust with Testcontainers 🧪
    2 projects | | 6 Sep 2023
    Rust Programming Language
  • Rust 1.72.0
    7 projects | | 24 Aug 2023
    AFAIK it's just waiting on the fix in to land, I don't know of any other blockers.
    7 projects | | 24 Aug 2023
    - Async traits: coming soon, actively in development (and has been for a while now, please don't confuse "this problem is hard and taking a long time" with "we don't care about this problem"

    - async `Drop`: there have been multiple "false-starts", trying to come up with an acceptable design. We don't have a good answer for this at the moment. It is unknown to me how long it might take for us to figure it out.

    - TAITs: same as async traits. It'll likely land after async fn in traits, but it's part of the same design and implementation effort.

    - variadic generics (unlikely they will every be implemented): agree with your assessment, at least in the short to medium term.

    - generic closures: same as above.

    - optional/named parameters: I believe that this feature as such might never exist in rust but think that a combination of structural structs (`struct { bar: usize, baz: usize }`) and/or struct literal inference (`let x: S = _ { bar: 1, baz: 2 }`) and default const values in structs (`struct S { foo: usize = 42, bar: usize }`/`S { bar: 0, .. }`) would be more generally useful and would nicely cater to this use case (`foo(_ { bar: 42, .. }`).

    - anonymous enums: I want this as well, but it interacts poorly with type parameters and automatic type upcasting (if you have `A | B` can you convert it into `A | B | C`? Does it need syntax? What about `Result<(), ()> | Option<()> | Result`? If you have a function that returns that, what does `return Err(())` do?). Type downcasting could be done by forcing a match expression on the value. Whether `A | B` should `impl T` if `A: T, B: T` is an open question. I want to push for a solution here in the coming year.

    7 projects | | 24 Aug 2023
    > from my totally uninformed bystander perspective, there's been a sharp drop in people working on the language and compiler full-time since around Mozilla layoffs, and Rust still hasn't recovered from that

    In terms of number of commits to the rust-lang/rust repo, activity peaked in late 2019/early 2020, whereas the Mozilla layoffs took place in late 2020. Activity since late 2020 has mostly stayed stable, and remains well above where it was at any point prior to 2018:

    In addition, I know of several former Mozillians who remain employed to work on Rust, including one who heads the Rust team at Amazon.

    As far as the number of contributors to each release, it's currently hovering around an all-time average high (although a handful of past releases have anomalously high peaks):


Posts with mentions or reviews of mimalloc. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2023-05-02.
  • Is the JVM a upside or downside to Scala?
    4 projects | /r/scala | 2 May 2023
    Yes, it's very efficient and that's not where the main problem lies. However, small allocations with modern C heap allocators like mimalloc or snmalloc has gotten extremely efficient as well. Would be interesting to see a benchmark comparison with Java's G1 and ZGC.
  • Z Garbage Collector: The Next Generation
    2 projects | | 24 Apr 2023
    Memory management for C is not itself a solved problem, not only is there a lot of performance to squeeze out of malloc itself (the benchmarks on exemplifies the variance between the implementations), but it's up to the programmer to implement memory management in the large in an efficient way, which is not an easy task. One sure mark of a slow C program is one with a ton of mallocs and frees strewn all over.
  • pmr implementation in c++14
    6 projects | /r/cpp | 26 Dec 2022
    If you are fine with heap allocations then there are only few dozens operator new/delete to override to regain control over normal C++ code memory use. Allocators and STL all need to call those. At least that's what gaming does on all platforms. If you need examples you can check Mimalloc on github ( ).
  • GitHub link to an Arma 3 allocator which increases performance by 20-50%
    2 projects | /r/arma | 21 Dec 2022
    What's the difference between this and Microsoft's?
  • Ichor v0.1.0: dependency injection now with co_await
    5 projects | /r/cpp | 6 Nov 2022
    This meant removing support for custom polymorphic memory resources, as clang still has no implementation for `memory_resource`. Instead, Ichor recommends using the provided mimalloc, as it tends to save on memory usage and increase performance significantly.
  • Implementing a C++ memory allocator to track our framework memory usage
    5 projects | /r/cpp | 31 Oct 2022
    I know you said you’d rather avoid jemalloc or the like, but for a quick set of stats you can LD_PRELOAD something like mimalloc, and use the MIMALLOC_SHOW_STATS=1 environment variable to get some coarse grained usage stats of allocations and frees.
    5 projects | /r/cpp | 31 Oct 2022
    This doesn’t directly address your concerns, but you may be interested in trying
  • Rust Mimalloc v0.1.30 has just been released!
    3 projects | /r/rust | 13 Oct 2022
    Version 0.1.19 of the Rust wrapper for the mimalloc memory allocator has just been released!
    3 projects | /r/rust | 13 Oct 2022
  • Hey Rustaceans! Got a question? Ask here! (39/2022)!
    11 projects | /r/rust | 26 Sep 2022
    Has anyone used as a drop in replacement of malloc? Were there any perf improvements?

What are some alternatives?

When comparing rust and mimalloc you can also consider the following projects:

carbon-lang - Carbon Language's main repository: documents, design, implementation, and related tools. (NOTE: Carbon Language is experimental; see README)


zig - General-purpose programming language and toolchain for maintaining robust, optimal, and reusable software.

rpmalloc - Public domain cross platform lock free thread caching 16-byte aligned memory allocator implemented in C

Nim - Nim is a statically typed compiled systems programming language. It combines successful concepts from mature languages like Python, Ada and Modula. Its design focuses on efficiency, expressiveness, and elegance (in that order of priority).

Odin - Odin Programming Language

snmalloc - Message passing based allocator

Elixir - Elixir is a dynamic, functional language for building scalable and maintainable applications

rust-analyzer - A Rust compiler front-end for IDEs [Moved to:]

Rustup - The Rust toolchain installer

go - The Go programming language

tbb - oneAPI Threading Building Blocks (oneTBB) [Moved to:]