3 For a high level overview see the [README](folly/README.md)
7 Below is a list of Folly components in alphabetical order, along with
8 a brief description of each.
10 #### `Arena.h`, `ThreadCachedArena.h`
12 Simple arena for memory allocation: multiple allocations get freed all
13 at once. With threaded version.
15 #### [`AtomicHashMap.h`, `AtomicHashArray.h`](AtomicHashMap.md)
17 High-performance atomic hash map with almost lock-free operation.
19 #### [`Benchmark.h`](Benchmark.md)
21 A small framework for benchmarking code. Client code registers
22 benchmarks, optionally with an argument that dictates the scale of the
23 benchmark (iterations, working set size etc). The framework runs
24 benchmarks (subject to a command-line flag) and produces formatted
25 output with timing information.
29 Various bit manipulation utilities optimized for speed; includes functions
31 [ffsl(l)](http://linux.die.net/man/3/ffsll) primitives in a uniform
34 #### `ConcurrentSkipList.h`
36 An implementation of the structure described in [A Provably Correct
37 Scalable Concurrent Skip
38 List](http://www.cs.tau.ac.il/~shanir/nir-pubs-web/Papers/OPODIS2006-BA.pdf)
41 #### [`Conv.h`](Conv.md)
43 A variety of data conversion routines (notably to and from string),
44 optimized for speed and safety.
46 #### `DiscriminatedPtr.h`
48 Similar to `boost::variant`, but restricted to pointers only. Uses the
49 highest-order unused 16 bits in a pointer as discriminator. So
50 `sizeof(DiscriminatedPtr<int, string, Widget>) == sizeof(void*)`.
52 #### [`dynamic.h`](Dynamic.md)
54 Dynamically-typed object, created with JSON objects in mind.
58 Endian conversion primitives.
62 Escapes a string in C style.
67 [`eventfd`](http://www.kernel.org/doc/man-pages/online/pages/man2/eventfd.2.html)
70 ####[`FBString.h`](FBString.md)
72 A drop-in implementation of `std::string` with a variety of optimizations.
74 ####[`FBVector.h`](FBVector.md)
76 A mostly drop-in implementation of `std::vector` with a variety of
81 Pseudo-statements (implemented as macros) for iteration.
83 ####[`Format.h`](Format.md)
85 Python-style formatting utilities.
87 ####[`GroupVarint.h`](GroupVarint.md)
90 encoding](http://www.ir.uwaterloo.ca/book/addenda-06-index-compression.html)
95 Various popular hash function implementations.
97 ####[`Histogram.h`](Histogram.md)
99 A simple class for collecting histogram data.
101 ####`IntrusiveList.h`
103 Convenience type definitions for using `boost::intrusive_list`.
107 JSON serializer and deserializer. Uses `dynamic.h`.
111 Wrappers around [`__builtin_expect`](http://gcc.gnu.org/onlinedocs/gcc/Other-Builtins.html).
115 Memory allocation helpers, particularly when using jemalloc.
119 Helpers for finding items in associative containers (such as
120 `std::map` and `std::unordered_map`).
122 ####[`PackedSyncPtr.h`](PackedSyncPtr.md)
124 A highly specialized data structure consisting of a pointer, a 1-bit
125 spin lock, and a 15-bit integral, all inside one 64-bit word.
129 Necessarily evil stuff.
133 Pretty-printer for numbers that appends suffixes of unit used: bytes
134 (kb, MB, ...), metric suffixes (k, M, G, ...), and time (s, ms, us,
137 ####[`ProducerConsumerQueue.h`](ProducerConsumerQueue.md)
139 Lock free single-reader, single-writer queue.
143 Defines only one function---`randomNumberSeed()`.
147 Boost-style range facility and the `StringPiece` specialization.
151 Fast and compact reader-writer spin lock.
155 C++11 incarnation of the old [ScopeGuard](http://drdobbs.com/184403758) idiom.
157 ####[`SmallLocks.h`](SmallLocks.md)
159 Very small spin locks (1 byte and 1 bit).
163 Vector with the small buffer optimization and an optional embedded
166 ####`sorted_vector_types.h`
168 Collections similar to `std::map` but implemented as sorted vectors.
172 STL allocator wrapping a simple allocate/deallocate interface.
176 String utilities that connect `folly::fbstring` with `std::string`.
180 Subprocess library, modeled after Python's subprocess module.
182 ####[`Synchronized.h`](Synchronized.md)
184 High-level synchronization library.
188 Demangling and errno utilities.
190 ####[`ThreadCachedInt.h`](ThreadCachedInt.md)
192 High-performance atomic increment using thread caching.
194 ####[`ThreadLocal.h`](ThreadLocal.md)
196 Improved thread local storage for non-trivial types.
200 Queue with per-item timeout.
204 Type traits that complement those defined in the standard C++11 header
209 Defines the `codePointToUtf8` function.