meta/folly
View on GitHub ↗ ★ 30,556 C++
An open-source C++ library developed and used at Facebook.
144 mentions on Hacker News by 90 people: 15 stories, 129 comments · first 2012-06-02 · latest 2026-01-14
20082026
-
…1.5, any growth factor below 2 has this property, how far below 2 regulates how quickly it happens, https://github.com/facebook/folly/blob/master/folly/docs/FBV... > it can be mathematically proven that a growth factor of 2 is rigorously…
comment by masklinn · 2021-04-14 · in Is WebAssembly magic performance pixie dust? -
…Facebook's Folly library also provides type erasure functionality: https://github.com/facebook/folly/blob/master/folly/docs/Pol... Google's Abseil is full of type erasure: https://abseil.io/ Here is Adobe's C++ library for ty
comment by Kranar · 2021-03-13 · in An Object-Oriented Language for the '20s -
…of the standard library you find is better than third party options. [1] https://abseil.io/ [2] https://github.com/facebook/folly [3] https://github.com/electronicarts/EASTL [4] https://www.boost.org/
comment by Kranar · 2021-03-09 · in “ISO obstructs adoption of standards by paywalling them” -
…to say this exact same thing. Their executors are also more widely adopted and worth mentioning: https://github.com/facebook/folly/blob/master/folly/docs/Exe...
comment by stormbeard · 2021-01-01 · in Concurrencpp – A C++ concurrency library -
Facebook's Folly provides something similar: https://github.com/facebook/folly/tree/master/folly/experime...
comment by loeg · 2021-01-01 · in Concurrencpp – A C++ concurrency library -
…demonstrated that it works well for all of Facebook's load balancers, container systems, etc. [0] https://github.com/facebook/folly/blob/16d6394130b0961f6d688...
comment by alexgartrell · 2020-11-26 · in How io_uring and eBPF Will Revolutionize Programming in Linux -
LLVM e.g. SmallVector: https://llvm.org/doxygen/SmallVector_8h_source.html Folly e.g. https://github.com/facebook/folly/tree/master/folly/logging , https://github.com/facebook/folly/blob/master/folly/concurre... ,…
comment by boryas · 2020-10-28 · in Ask HN: Good C++ code bases to read? -
https://github.com/facebook/folly https://github.com/ziglang/zig
comment by latenightcoding · 2020-10-28 · in Ask HN: Good C++ code bases to read? -
…https://github.com/scylladb/scylla https://github.com/catchorg/Catch2 https://github.com/facebook/folly
comment by gtirloni · 2020-10-27 · in Ask HN: Good C++ code bases to read? -
…rseq library. The kernel will update the current CPU in a thread local on every context switch. [0] https://github.com/facebook/folly/blob/a590a0e559d0f1c7af442...
comment by terrelln · 2020-09-17 · in A Concurrency Cost Hierarchy -
…and folly::f14:F14FastMap[2]. [1] https://abseil.io/about/design/swisstables [2] https://github.com/facebook/folly/blob/master/folly/containe...
comment by alexhutcheson · 2020-06-18 · in Cuckoo++ – High-Performance Hash Tables for Networking Applications (2017) -
…and/or F14FastMap[2]. [1] https://abseil.io/docs/cpp/guides/container#hash-tables [2] https://github.com/facebook/folly/blob/master/folly/containe...
comment by alexhutcheson · 2020-04-24 · in Comparison of C++17, Go, and Java for a next-generation sequencing tool -
…the library's contents. That said, the code is also reasonably well commented as well, for example: https://github.com/facebook/folly/blob/master/folly/Singleto... . So "read the code" is not terrible advice in this case either.
comment by shafte · 2020-04-17 · in Folly – Faceboook’s open source C++ library -
…them more of a framework (and not one I would use if I had a choice) than a set of primitives. https://github.com/facebook/folly/tree/master/folly/io/async
comment by notacoward · 2020-04-16 · in Folly – Faceboook’s open source C++ library -
…could be single small packages that would be as fast. As an example, look at this folder which: https://github.com/facebook/folly/tree/master/folly/compress... In short, these are compression tools. Why not have 1 easily uninstallable…
comment by antoineMoPa · 2020-04-16 · in Folly – Faceboook’s open source C++ library -
…of data structures, algorithms, and performance utilities. The overview is much more informative: https://github.com/facebook/folly/blob/master/folly/docs/Ove...
comment by kroltan · 2020-04-16 · in Folly – Faceboook’s open source C++ library -
▲ 110
Folly – Faceboook’s open source C++ librarystory by crakenzak · 2020-04-15 · 87 comments
-
…a CMOV, making the code size issue almost moot. I implemented that in fbstring back in the day: https://github.com/facebook/folly/commit/be4c6d6b3e21914df8a... This is the entirety of size(): 0f b6 57 17 movzbl 0x17(%rdi),%edx b8 17 00 00…
comment by ot · 2020-01-31 · in Libc++'s Implementation of std::string -
…load [1]. A shame Folly isn't available on Compiler Explorer, would be interesting to compare. [0]: https://github.com/facebook/folly/blob/master/folly/FBString... [1]: https://godbolt.org/z/U-LvGm
comment by OskarS · 2020-01-31 · in Libc++'s Implementation of std::string -
…of various cleverness detailed in that talk), but it's no longer our `std::string`. For reference: https://github.com/facebook/folly/blob/master/folly/FBString...
comment by lbrandy · 2020-01-31 · in Libc++'s Implementation of std::string -
…in the experimental directory), but I guess there were some libraries trying to accomplish this. https://github.com/facebook/folly/tree/master/folly/experime...
comment by civicsquid · 2020-01-19 · in C++ coroutines: Initial implementation pushed to master -
…transactions with a lock cmpxchg16b instruction, or with a more complicated algorithm like this: https://github.com/facebook/folly/blob/3de8f357eecaff89e3847...
comment by ot · 2019-11-14 · in Intel disables Hardware Lock Elision on all current CPUs -
There's folly's small_vector. https://github.com/facebook/folly/blob/master/folly/docs/sma... High quality, and widely used inside Facebook. It's a shame folly isn't more widely used outside.
comment by martincmartin · 2019-10-01 · in Data Structures Part 3: Arrays of Arrays -
…in https://webkit.org/blog/6161/locking-in-webkit/ ) which inspired an implementation in folly ( https://github.com/facebook/folly/blob/master/folly/synchron... ). Surprisingly, implementing futexes in userland can have performance…
comment by ot · 2019-08-01 · in Implement mechanism to wait on any of several futexes -
…go at least back to Symbolics if not further. One that I thought was especially nifty was [0]. [0] https://github.com/facebook/folly/blob/master/folly/PackedSy...
comment by benreesman · 2019-07-01 · in Go Slices Are Fat Pointers -
…(the base class of F14FastMap F14ValueMap and all the others) is extending std::unordered_map ? https://github.com/facebook/folly/blob/master/folly/containe... they seem to be calling the table_ member for every method in the book. Still…
comment by MichaelMoser123 · 2019-04-27 · in Open-sourcing F14 for memory-efficient hash tables -
…also just insert lots of keys that all have the same hash code. See the steady_state_stats test at https://github.com/facebook/folly/blob/master/folly/containe...
comment by ngbronson · 2019-04-26 · in Open-sourcing F14 for memory-efficient hash tables -
Hasn't this been open-sourced since at least last March? https://github.com/facebook/folly/commit/93d49bcf9a44d6b2d9c...
comment by alexhutcheson · 2019-04-26 · in Open-sourcing F14 for memory-efficient hash tables -
…F14 maps use this strategy, and handle erase + insert workloads fine with no rehashing needed. https://github.com/facebook/folly/blob/master/folly/containe...
comment by ngbronson · 2019-03-21 · in Why Hashbrown Does a Double Lookup -
…switched over to zstd organically, without our involvement, since it was such a clear win. [0] https://github.com/facebook/folly/blob/master/folly/compress...
comment by terrelln · 2018-12-19 · in Improving compression at scale with Zstandard -
One thing worth trying out as well are the folly::F14 hashmaps ( https://github.com/facebook/folly/blob/master/folly/containe... ), which has a roughly similar design. You can find some discussions on the performance tradeoffs by the…
comment by ajtulloch · 2018-12-07 · in The Swiss Army Knife of Hashmaps -
See also F14 ( https://github.com/facebook/folly/blob/master/folly/containe... ), it uses a similar design to SwissTable but was opensourced a few months earlier. Interestingly it is faster than SwissTable on Google's benchmarks:…
comment by ot · 2018-10-24 · in Swiss Tables and absl::Hash -
…known folklore technique for quite a while. For example it was used in Folly as early as Jan 2016: https://github.com/facebook/folly/commit/b28186247104f8b90cf...
comment by ot · 2018-10-14 · in A Fast x86 Implementation of Select (2017) [pdf] -
▲ 2
F14 Hash Tablestory by ingve · 2018-09-28 · 0 comments
-
As to mem allocation in vector: https://github.com/facebook/folly/blob/master/folly/docs/FBV...
comment by michal_f · 2018-09-21 · in C++ Core Coroutines Proposal [pdf] -
Facebook folly: https://github.com/facebook/folly/blob/master/folly/synchron... Proposals for c++ standardization: http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2016/p027...
comment by DSingularity · 2018-08-13 · in User-space RCU -
An overview list on what it offers: https://github.com/facebook/folly/blob/master/folly/docs/Ove...
comment by federicoponzi · 2018-06-01 · in Folly: An open-source C++ library developed and used at Facebook -
▲ 4
Folly: An open-source C++ library developed and used at Facebookstory by federicoponzi · 2018-06-01 · 1 comment
-
Side note: FB also developed a string library to replace std::string ( https://github.com/facebook/folly/blob/master/folly/FBString... ). Here's a video from explaining the motivation behind the project (…
comment by 3uclid · 2018-04-12 · in Show HN: SuperString – A fast and memory-optimized string library for C++ -
…extensively internally). [0]: https://code.facebook.com/posts/745068642270222/fighting-spa... [1]: https://github.com/facebook/folly/tree/master/folly
comment by madhadron · 2017-12-23 · in Opinions on functional programming and OCaml -
…Can any Googlers speak to how these projects are synchronized with the internal monorepo? [0]: https://github.com/facebook/folly [1]: https://bazel.build
comment by jzelinskie · 2017-09-28 · in Introducing Abseil, a new common libraries project -
…folly, has been Apache 2.0 since at least 2012 and never had the BSD+patent license put upon it. https://github.com/facebook/folly/blob/master/LICENSE
comment by unwiredben · 2017-09-22 · in Relicensing React, Jest, Flow, and Immutable.js -
There are already coroutine libraries for C++. I've used folly's Fibers with great success. https://github.com/facebook/folly/tree/master/folly/fibers
comment by martincmartin · 2017-09-07 · in C++17 is formally approved -
…LLVM range-v3 https://github.com/ericniebler/range-v3 Facebook folly https://github.com/facebook/folly easylambda https://github.com/haptork/easylambda thrust https://github.com/thrust/thrust xtensor https://xtensor.readthedocs
comment by cottonseed · 2017-07-09 · in Ask HN: Name good examples of Modern C++ usage -
https://github.com/facebook/folly
comment by nick0garvey · 2017-07-08 · in Ask HN: Name good examples of Modern C++ usage -
Also check out https://github.com/facebook/folly which "complements" Boost and std
comment by personjerry · 2017-06-26 · in Does the Boost library meet its original goal? -
…Boost I might be extremely biased about this, but I can't not recommend to follow Folly as well ( https://github.com/facebook/folly ). There is some very good C++ there (and some bad C++ too), and it is generally more readable than Boost.…
comment by ot · 2017-06-23 · in Ways to Get Better at C++ -
▲ 1
An Implementation of std::atomic_shared_ptr TS in Facebook's Follystory by noahdesu · 2017-06-16 · 0 comments
-
…if there's cache pressure from other code. See this implementation of JSON escaping for example: https://github.com/facebook/folly/commit/2f0cabfb48b8a8df84f... De-escaping is even simpler because you only have to detect two characters, \…
comment by ot · 2017-05-26 · in Writing a Fast JSON Parser -
There's also https://github.com/facebook/folly/blob/master/folly/docs/Ato... that I know of trying to solve this problem.
comment by th0br0 · 2017-05-21 · in An Atomic Hash Table