Hacker GitHub

← All repos

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

Mentions per year 144 mentions · busiest year 2020 (16)
20082026
  1. …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
  2. Facebook's Folly provides something similar: https://github.com/facebook/folly/tree/master/folly/experime...
  3. …demonstrated that it works well for all of Facebook's load balancers, container systems, etc. [0] https://github.com/facebook/folly/blob/16d6394130b0961f6d688...
  4. 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?
  5. 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?
  6. …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?
  7. …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
  8. …and folly::f14:F14FastMap[2]. [1] https://abseil.io/about/design/swisstables [2] https://github.com/facebook/folly/blob/master/folly/containe...
  9. …and/or F14FastMap[2]. [1] https://abseil.io/docs/cpp/guides/container#hash-tables [2] https://github.com/facebook/folly/blob/master/folly/containe...
  10. …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.
  11. …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
  12. …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
  13. …of data structures, algorithms, and performance utilities. The overview is much more informative: https://github.com/facebook/folly/blob/master/folly/docs/Ove...
  14. …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…
  15. …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
  16. …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
  17. …in the experimental directory), but I guess there were some libraries trying to accomplish this. https://github.com/facebook/folly/tree/master/folly/experime...
  18. …transactions with a lock cmpxchg16b instruction, or with a more complicated algorithm like this: https://github.com/facebook/folly/blob/3de8f357eecaff89e3847...
  19. 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
  20. …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…
  21. …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
  22. …(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
  23. …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...
  24. 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
  25. …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
  26. …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...
  27. 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
  28. 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
  29. …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...
  30. 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]
  31. 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
  32. An overview list on what it offers: https://github.com/facebook/folly/blob/master/folly/docs/Ove...
  33. 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 (…
  34. …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
  35. …Can any Googlers speak to how these projects are synchronized with the internal monorepo? [0]: https://github.com/facebook/folly [1]: https://bazel.build
  36. …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
  37. 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
  38. …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
  39. https://github.com/facebook/folly
    comment by nick0garvey · 2017-07-08 · in Ask HN: Name good examples of Modern C++ usage
  40. 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?
  41. …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++
  42. …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
  43. 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
  44. Facebook's open source C++11 library: https://github.com/facebook/folly
    comment by personjerry · 2017-03-13 · in Ask HN: What are some examples of good code?
  45. …> n, you'll still have the identity over the first n numbers. Personally I just use folly::Hash ( https://github.com/facebook/folly/blob/da08e63ce3bac9196b18d... ) as it uses sane defaults for hash functions, and contrary to std::hash it's…
    comment by ot · 2017-02-27 · in I Wrote My Fastest Hashtable
  46. …in C++ programs; this change shaved a few MBs of .text from a bunch of large services at FB: https://github.com/facebook/folly/commit/be4c6d6b3e21914df8a... .
  47. …and linearizeable. It's used extensively inside Facebook. Disclaimer: I work at Facebook. [1] https://github.com/facebook/folly/blob/master/folly/MPMCQueu...
  48. Facebook's folly also has a MPMC queue: https://github.com/facebook/folly/blob/master/folly/MPMCQueu...
  49. …"hello" after We had to deprecate the initializer_list constructor and fix all the occurrences ( https://github.com/facebook/folly/commit/07dc3ce5923b2d761ca... , https://github.com/facebook/folly/commit/d458b0a14486b9d80d5... ).
  50. …structs. This can generate better code. Folly has a generic `loadUnaligned()` that uses this trick: https://github.com/facebook/folly/blob/5d52fb8c30e567403b8cc...