An open-source C++ library developed and used at Facebook. (by facebook)

Folly Alternatives

Similar projects and alternatives to Folly

  • GitHub repo abseil-cpp

    Abseil Common Libraries (C++)

  • GitHub repo libcuckoo

    A high-performance, concurrent hash table

  • Scout APM

    Scout APM: A developer's best friend. Try free for 14-days. Scout APM uses tracing logic that ties bottlenecks to source code so you know the exact line of code causing performance issues and can get back to building a great product faster.

  • GitHub repo parallel-hashmap

    A family of header-only, very fast and memory-friendly hashmap and btree containers.

  • GitHub repo CppCoreGuidelines

    The C++ Core Guidelines are a set of tried-and-true guidelines, rules, and best practices about coding in C++

  • GitHub repo react-native-windows

    A framework for building native Windows apps with React.

  • GitHub repo tokio

    A runtime for writing reliable asynchronous applications with Rust. Provides I/O, networking, scheduling, timers, ...

  • GitHub repo learnxinyminutes-docs

    Code documentation written as code! How novel and totally my idea!

  • SaaSHub

    SaaSHub - Software Alternatives and Reviews. SaaSHub helps you find the best software and product alternatives

  • GitHub repo SFML

    Simple and Fast Multimedia Library

  • GitHub repo pytype

    A static type analyzer for Python code

  • GitHub repo ck

    Concurrency primitives, safe memory reclamation mechanisms and non-blocking (including lock-free) data structures designed to aid in the research, design and implementation of high performance concurrent systems developed in C99+.

  • GitHub repo cppcoro

    A library of C++ coroutine abstractions for the coroutines TS

  • GitHub repo libdill

    Structured concurrency in C

  • GitHub repo junction

    Concurrent data structures in C++

  • GitHub repo libunifex

    Unified Executors

  • GitHub repo concurrencpp

    Modern concurrency for C++. Tasks, executors, timers and C++20 coroutines to rule them all

  • GitHub repo Hopscotch map

    C++ implementation of a fast hash map and hash set using hopscotch hashing

  • GitHub repo cs_libguarded

    Header-only library for multithreaded programming

  • GitHub repo lock_ios

    iostream synchronization manipulator for concurrency

  • GitHub repo ThreadSafeVar

    Simple wrapper to create thread safe variable with a mutex.

  • GitHub repo IFilter

    C++/Arduino compatible, integer-only signal processing filters

NOTE: The number of mentions on this list indicates mentions on common posts. Hence, a higher number means a better Folly alternative or higher similarity.


Posts where Folly has been mentioned. We have used some of these posts to build our list of alternatives and similar projects - the last one was on 2021-06-28.
  • Type trait for "does the default constructor 0 initialize all non-static members" | 2021-06-28
    Facebook's folly library has a way to do it, sort of: by making the developer add a IsZeroInitializable trait to a type - either by adding a typedef/using statement in that type class's declaration, or specializing IsZeroInitializable<> for their type.
  • Best learning resources for an experienced developer in a different language? | 2021-06-12
    Additionally, some libraries you should probably look at are Abseil, Folly, Boost (Opinion is split between heaven send and scum of the earth on this one.), SFML, and SDL.
  • Painless C++ Coroutines | 2021-06-10
    We try to encourage waiting directly on children to maintain strong structured concurrency. We do have fairly basic static analysis to catch some common lifetime bugs. We have library support in the form of co_invoke to help with lambdas and lifetimes. A lot of when_all use (collectAll in our case) but when_any we have tried to avoid - in part because getting solid cancellation support in folly::coro took a while, and cancellation is vital to make safe use of when_any easy.
  • C++20 coroutines seem baffling | 2021-06-03
    Possibly, but all of that functionality has value. We use it to maintain executor affinity for coroutines, to carry context state for web requests, to allow us to trace dependencies between coroutines and to allow us to walk chains of coroutines in gdb with a simple co_bt command.
  • "Consuming Interfaces Are Rvalue Reference Qualified" and use-after-move static checks | 2021-06-02
    In, the paper states that "Consuming Interfaces Are Rvalue Reference Qualified." This seems to make sense to me, both making clear to the reader that the object should not be interacted with after calling e.g. get(), and that tools like bugprone-use-after-move would detect code which attempted to further interact with the Future after it's been consumed. Indeed, Facebook Folly Futures rvalue reference qualify consuming member functions.
  • Libdill: Structured Concurrency for C (2016) | 2021-06-01
    There are plenty of practical solutions to the safe memory reclamation problem in C. The language just doesn't force one on you.

    From epoch-based reclamation (, especially with the multiplexing extension to Fraser's classic scheme), to quiescence schemes (, or hazard pointers (, or or even simple using a type-stable ( memory allocator.

    In my experience, it's easier to write code that is resilient to hiccups in C than in Java. Solving SMR with GC only offers something close to lock-freedom when you can guarantee global GC pauses are short enough... and common techniques to bound pauses, like explicitly managed freelists land you back in the same problem space as C.

  • Linked lists be like
    Off the top of my head, I know that both Java and C++'s standard libraries use chaining. In C++ this is why you should use abseil's flat_hash_map, folly's FastMap or other equivalent to avoid this.
  • Need Something Sorted? Sleep on It | 2021-05-24
    Hashed hierarchical timing wheels is a pretty cool data strucutre to make this efficient. The paper claims it's O(1) to start, stop and maintain timers which is much more efficient than O(log n).

    Given there's n timers and O(1) operations I'm not sure where the O(n log n) fits in here. Possible in the minimum number of ticks?

    Production implementation:

  • FAANG hires C++ Developers?
  • std::future and coroutine
    I don't know anything about MSVC but I do know there is no coroutine support library in c++20. You'll need something like folly::coro.
  • Kuro - a C++20 coroutine library inspired by asyncio | 2021-05-10
    I don't seriously expect anyone to use this - I basically just worked on it until I got sick of it and then polished it into a somewhat releasable state. Especially as I've just recently become aware of folly/experimental/coro, which largely seems to be what I've been doing but better. Still, I hope it's of use to some people, even if it's just looking at the code to better understand how to use coroutines in your own code.
  • Do I need Flipper?
    Facebook is working on it
  • Abuse co_await operator for error handling | 2021-04-27
    It shouldn't be hard to make it work. folly's Expected type supports operator co_await, and I just experimented with moving the promise_type alias out of the class and into a coroutine_traits specialization:
  • Experiences with Concurrent Hash Map Libraries | 2021-04-27
    folly's AtomicHashMap requires knowing the approximate number of elements up-front and the space for erased elements can never be reclaimed. This doesn't work well for our application.
  • Why C++ Is Terrifying | 2021-04-16
    folly::Function was added for exactly this reason I think


Basic Folly repo stats
5 days ago

facebook/folly is an open source project licensed under Apache License 2.0 which is an OSI approved license.