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. …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…
  2. …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
  3. …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/
  4. …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
  5. Facebook's Folly provides something similar: https://github.com/facebook/folly/tree/master/folly/experime...
  6. …demonstrated that it works well for all of Facebook's load balancers, container systems, etc. [0] https://github.com/facebook/folly/blob/16d6394130b0961f6d688...
  7. 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?
  8. 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?
  9. …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?
  10. …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
  11. …and folly::f14:F14FastMap[2]. [1] https://abseil.io/about/design/swisstables [2] https://github.com/facebook/folly/blob/master/folly/containe...
  12. …and/or F14FastMap[2]. [1] https://abseil.io/docs/cpp/guides/container#hash-tables [2] https://github.com/facebook/folly/blob/master/folly/containe...
  13. …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.
  14. …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
  15. …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
  16. …of data structures, algorithms, and performance utilities. The overview is much more informative: https://github.com/facebook/folly/blob/master/folly/docs/Ove...
  17. ▲ 110
    Folly – Faceboook’s open source C++ library
    story by crakenzak · 2020-04-15 · 87 comments
  18. …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…
  19. …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
  20. …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
  21. …in the experimental directory), but I guess there were some libraries trying to accomplish this. https://github.com/facebook/folly/tree/master/folly/experime...
  22. …transactions with a lock cmpxchg16b instruction, or with a more complicated algorithm like this: https://github.com/facebook/folly/blob/3de8f357eecaff89e3847...
  23. 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
  24. …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…
  25. …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
  26. …(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
  27. …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...
  28. 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
  29. …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
  30. …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...
  31. 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
  32. 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
  33. …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...
  34. ▲ 2
    F14 Hash Table
    story by ingve · 2018-09-28 · 0 comments
  35. 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]
  36. 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
  37. An overview list on what it offers: https://github.com/facebook/folly/blob/master/folly/docs/Ove...
  38. ▲ 4
    Folly: An open-source C++ library developed and used at Facebook
    story by federicoponzi · 2018-06-01 · 1 comment
  39. 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 (…
  40. …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
  41. …Can any Googlers speak to how these projects are synchronized with the internal monorepo? [0]: https://github.com/facebook/folly [1]: https://bazel.build
  42. …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
  43. 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
  44. …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
  45. https://github.com/facebook/folly
    comment by nick0garvey · 2017-07-08 · in Ask HN: Name good examples of Modern C++ usage
  46. 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?
  47. …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++
  48. ▲ 1
    An Implementation of std::atomic_shared_ptr TS in Facebook's Folly
    story by noahdesu · 2017-06-16 · 0 comments
  49. …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
  50. 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