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
-
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? -
…> 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 -
…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... .
comment by ot · 2017-01-23 · in Delete an inline function, save 794 kB -
…and linearizeable. It's used extensively inside Facebook. Disclaimer: I work at Facebook. [1] https://github.com/facebook/folly/blob/master/folly/MPMCQueu...
comment by martincmartin · 2016-12-05 · in A fast multi-producer, multi-consumer lock-free concurrent queue for C++11 -
Facebook's folly also has a MPMC queue: https://github.com/facebook/folly/blob/master/folly/MPMCQueu...
comment by film42 · 2016-12-05 · in A fast multi-producer, multi-consumer lock-free concurrent queue for C++11 -
…"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... ).
comment by ot · 2016-11-22 · in Help me sort out the meaning of “{}” as a constructor argument -
…structs. This can generate better code. Folly has a generic `loadUnaligned()` that uses this trick: https://github.com/facebook/folly/blob/5d52fb8c30e567403b8cc...
comment by ot · 2016-11-07 · in A bug story: data alignment on x86 -
The TimerWheel abstraction, implemented for example: - https://github.com/facebook/folly/blob/master/folly/io/async... (Facebook/Folly) - https://github.com/real-logic/Agrona/blob/886d7744fa15fc3de1... (Real-Logic/Argona) and in turn based…
comment by markpapadakis · 2016-07-06 · in Implementing Software Timers (1990) -
…the coroutines proposals working their way through the C++ committee can make lives better. [1] https://github.com/facebook/folly/tree/master/folly/fibers [2] https://github.com/facebook/folly/tree/master/folly/futures [3]…
comment by lbrandy · 2016-05-26 · in Parallelizing the Naughty Dog Engine Using Fibers [video] -
Facebook's Folly library implements something similar: https://github.com/facebook/folly/blob/master/folly/ScopeGua... It provides some macros to make it easier to use, e.g. SCOPE_EXIT { cleanup(); more_cleanup(); if…
comment by Kristine1975 · 2016-04-28 · in Custom Deleters for C++ Smart Pointers -
I just tried to compile folly in OSX and it fails to compile with homebrew. https://github.com/facebook/folly/issues/400 Also, Once I manage to compile folly and then wangle, what kind of database drivers can I use in conjunction with…
comment by thepumpkin1979 · 2016-04-20 · in Wangle – an asynchronous C++ networking and RPC library -
…although anecdotally GCC makes better use of these hints. Folly has a function to make it portable: https://github.com/facebook/folly/blob/bb5ed8070d533c016e1e9...
comment by ot · 2016-02-22 · in How undefined signed overflow enables optimizations in GCC -
▲ 1
Folly futuresstory by marvel_boy · 2016-02-16 · 0 comments
-
▲ 2
Folly C++11 libaraystory by autoreleasepool · 2016-02-03 · 0 comments
-
…has the same trick, and it's a std::string compliant implementation used in production at Facebook. https://github.com/facebook/folly/blob/master/folly/docs/FBS...
comment by ot · 2016-01-28 · in SSO-23: Memory-Optimal Small String Optimization Implementation for C++ -
…fd callbacks and event_base, as well as providing implementations for many common types of fd uses. https://github.com/facebook/folly/blob/master/folly/io/async... grepping the codebase for `asio` brings up nothing.
comment by neomantra · 2016-01-10 · in Writing high-performance servers in modern C++ -
…combinators. You get all the map/filter/take/drop/reduce primitives, but in a much cleaner way. See https://github.com/facebook/folly/blob/master/folly/gen/test... for an example.
comment by ajtulloch · 2015-11-26 · in FunctionalPlus – helps you write concise and readable C++ code -
https://github.com/facebook/folly/blob/master/folly/Benchmar...
comment by ot · 2015-07-16 · in GCC 5.2 released -
Folly Futures support interrupts and cancellations. See https://github.com/facebook/folly/blob/master/folly/futures/...
comment by jsedgwick · 2015-06-20 · in Futures for C++11 at Facebook -
…goodness as a real futex, but is fully portable. For an example of this technique, check out https://github.com/facebook/folly/blob/master/folly/detail/F... . That code only implements wake and wait, but it would be straightforward to…
comment by ngbronson · 2015-04-24 · in Show HN: Evenk C++ concurrency library -
…idea. It also has some nice features like buffered file reading, fork-join parallelism, etc. [1]: https://github.com/facebook/folly/blob/75278c6326af4e6a81b87...
comment by ajtulloch · 2015-04-06 · in C++ Streams -
…most 23 characters in-place, and it's a widely used implementation (at least within Facebook :) ) https://github.com/facebook/folly/blob/master/folly/FBString...
comment by ot · 2014-12-08 · in Small string optimisation proof-of-concept -
…and libraries, completely replacing std::string both for our own code and third-party code. https://github.com/facebook/folly/blob/master/folly/docs/FBS... In addition, it is worth noting folly::StringPiece (from folly/Range.h), which is…
comment by ctur · 2014-12-05 · in Std::string half of all allocations in the Chrome browser process -
…Proxygen as well. Proxygen heavily relies on folly's buffer management abstractions such as IOBuf ( https://github.com/facebook/folly/blob/master/folly/io/IOBuf... ) and Cursor ( https://github.com/facebook/folly/blob/master/folly/io/Curso.…
comment by seasonedschemer · 2014-11-05 · in Proxygen, Facebook's C++ HTTP Framework -
…[1], this is just: using namespace folly::gen; byLine('/a/file/with/numbers') | eachTo<int> | sum; https://github.com/facebook/folly/tree/master/folly/gen
comment by ajtulloch · 2014-10-19 · in The overhead of abstraction in C/C++ vs. Python/Ruby -
…library is much more interesting and can yield better performance (if you hit the sweet spot). https://github.com/facebook/folly/blob/master/folly/docs/sma... From what I understand, using a "rvalue-reference ready" vector implementation…
comment by shin_lao · 2014-08-30 · in Facebook's std::vector optimization -
▲ 275
Facebook's std::vector optimizationstory by iamsalman · 2014-08-30 · 89 comments
-
…have the cleanup code optimized away. An updated version of ScopeGuard doesn't have this problem ( https://github.com/facebook/folly/blob/master/folly/ScopeGua... ). So, yes, I'll concede that code that expects you to cast some kind of…
comment by maxlybbert · 2014-06-24 · in Why C++ Sails When the Vasa Sank [pdf] -
…library contains a really clean lock-free SPSC queue [1], and a really fast MPMC queue [2]. [1]: https://github.com/facebook/folly/blob/master/folly/Producer... [2]: https://github.com/facebook/folly/blob/master/folly/MPMCQueu...
comment by ajtulloch · 2014-05-29 · in Wait-free queueing and ultra-low latency logging -
…| filter([](int i){ return i % 2 == 0; }) | mapped([](int i){ return i * i; }) | as<vector>(); } https://github.com/facebook/folly/tree/master/folly/gen
comment by ajtulloch · 2014-04-11 · in C++ – From goto to std::transform -
…Folly from facebook. I haven't taken a close look, but I know they do some jemalloc-specific code: https://github.com/facebook/folly/tree/master/folly The other allocated-related thing that C++ really wants (and could benefit C as well) is…
comment by bodyfour · 2014-04-06 · in A Story Of realloc (And Laziness) -
…an infinite amount of samples and keeping the minimum is the actual time that needs measuring. [0]: https://github.com/facebook/folly/blob/master/folly/Benchmar... [1]: https://github.com/facebook/folly/blob/master/folly/docs/Ben...
comment by csl · 2014-04-04 · in Don't use assembly unless you're an expert -
https://github.com/facebook/folly
comment by textminer · 2014-02-21 · in Open-sourcing Facebook's internal branch of Thrift -
…way (and also prevents access without acquiring the lock): SYNCHRONIZED(data) { // modify data } https://github.com/facebook/folly/blob/master/folly/Synchron...
comment by zeroonetwothree · 2014-02-07 · in In the C++ bag of tricks: scoped locks -
I hadn't heard of Folly; so for others: https://github.com/facebook/folly
comment by emmelaich · 2013-05-21 · in A fast lock-free queue for C++ -
…of a single-producer single-consumer lock-free queue in Facebook's folly C++ library. https://github.com/facebook/folly/blob/master/folly/Producer... (code) https://github.com/facebook/folly/blob/master/folly/docs/Pro... (docs)
comment by ajtulloch · 2013-03-27 · in Common Pitfalls in Writing Lock-Free Algorithms -
▲ 2
The nuances of implementing a resizing vector efficienctlystory by elehack · 2013-02-19 · 0 comments
-
▲ 1
Ask HN: Object realocation with memmovestory by dhucerbin · 2012-09-03 · 1 comment
-
▲ 1
Folly: The Facebook Open Source Librarystory by oneofthose · 2012-06-04 · 0 comments
-
▲ 2
Folly (acronymed loosely after Facebook Open Source Library)story by chorola · 2012-06-03 · 0 comments
-
…code, but I'm sure as hell going to look at making my C vector code do some of what FBVector does: https://github.com/facebook/folly/blob/master/folly/docs/FBV...
comment by tptacek · 2012-06-03 · in Folly - The Faceboook open source library -
I'm going to be taking a serious look at this for my own projects. I like Format: https://github.com/facebook/folly/blob/master/folly/docs/For... Histogram is going to come in handy. :) fbstring seems to be exactly what the doctor ordered.…
comment by luser001 · 2012-06-02 · in Folly - The Faceboook open source library -
This all fits into Folly: The Facebook Open Source Library. https://github.com/facebook/folly
comment by ramisayar · 2012-06-02 · in Facebook C++ Conference Live Blogging -
▲ 4
Fbstring open-sourcedstory by ramisayar · 2012-06-02 · 1 comment