Folly VS chromium

Compare Folly vs chromium and see what are their differences.

Folly

An open-source C++ library developed and used at Facebook. (by facebook)

chromium

The official GitHub mirror of the Chromium source (by chromium)
Our great sponsors
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • WorkOS - The modern identity platform for B2B SaaS
  • SaaSHub - Software Alternatives and Reviews
Folly chromium
90 224
27,072 17,574
1.0% 2.6%
9.8 10.0
3 days ago 3 days ago
C++
Apache License 2.0 BSD 3-clause "New" or "Revised" License
The number of mentions indicates the total number of mentions that we've tracked plus the number of user suggested alternatives.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.

Folly

Posts with mentions or reviews of Folly. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2024-03-29.
  • Ask HN: How bad is the xz hack?
    1 project | news.ycombinator.com | 31 Mar 2024
    https://github.com/facebook/folly/commit/b1391e1c57be71c1e2a...
  • Backdoor in upstream xz/liblzma leading to SSH server compromise
    49 projects | news.ycombinator.com | 29 Mar 2024
    https://github.com/facebook/folly/pull/2153
  • A lock-free ring-buffer with contiguous reservations (2019)
    9 projects | news.ycombinator.com | 29 Feb 2024
    To set a HP on Linux, Folly just does a relaxed load of the src pointer, release store of the HP, compiler-only barrier, and acquire load. (This prevents the compiler from reordering the 2nd load before the store, right? But to my understanding does not prevent a hypothetical CPU reordering of the 2nd load before the store, which seems potentially problematic!)

    Then on the GC/reclaim side of things, after protected object pointers are stored, it does a more expensive barrier[0] before acquire-loading the HPs.

    I'll admit, I am not confident I understand why this works. I mean, even on x86, loads can be reordered before earlier program-order stores. So it seems like the 2nd check on the protection side could be ineffective. (The non-Linux portable version just uses an atomic_thread_fence SeqCst on both sides, which seems more obviously correct.) And if they don't need the 2nd load on Linux, I'm unclear on why they do it.

    [0]: https://github.com/facebook/folly/blob/main/folly/synchroniz...

    (This uses either mprotect to force a TLB flush in process-relevant CPUs, or the newer Linux membarrier syscall if available.)

  • Appending to an std:string character-by-character: how does the capacity grow?
    2 projects | news.ycombinator.com | 26 Oct 2023
    folly provides functions to resize std::string & std::vector without initialization [0].

    [0] https://github.com/facebook/folly/blob/3c8829785e3ce86cb821c...

  • Can anyone explain feedback of a HFT firm regarding implementation of SPSC lock-free ring-buffer queue?
    1 project | /r/highfreqtrading | 12 Jul 2023
    My implementation was quite similar to Boost's spsc_queue and Facebook's folly/ProducerConsumerQueue.h.
  • A Compressed Indexable Bitset
    6 projects | news.ycombinator.com | 1 Jul 2023
    > How is that relevant?

    Roaring bitmaps and similar data structures get their speed from decoding together consecutive groups of elements, so if you do sequential decoding or decode a large fraction of the list you get excellent performance.

    EF instead excels at random skipping, so if you visit a small fraction of the list you generally get better performance. This is why it works so well for inverted indexes, as generally the queries are very selective (otherwise why do you need an index?) and if you have good intersection algorithms you can skip a large fraction of documents.

    I didn't follow the rest of your comment, select is what EF is good at, every other data structure needs a lot more scanning once you land on the right chunk. With BMI2 you can also use the PDEP instruction to accelerate the final select on a 64-bit block: https://github.com/facebook/folly/blob/main/folly/experiment...

  • Defer for Shell
    1 project | news.ycombinator.com | 20 Jun 2023
    C++ with folly's SCOPE_EXIT {} construct:

    https://github.com/facebook/folly/blob/main/folly/ScopeGuard...

  • Is there any facebook/folly community for discussion and Q&A?
    1 project | /r/cpp | 19 Jun 2023
    Seems like github issues taking a long time to get any response: https://github.com/facebook/folly
  • How a Single Line of Code Made a 24-Core Server Slower Than a Laptop
    4 projects | news.ycombinator.com | 17 Jun 2023
    Can't speak for abseil and tbb, but in folly there are a few solutions for the common problem of sharing state between a writer that updates it very infrequently and concurrent readers that read it very frequently (typical use case is configs).

    The most performant solutions are RCU (https://github.com/facebook/folly/blob/main/folly/synchroniz...) and hazard pointers (https://github.com/facebook/folly/blob/main/folly/synchroniz...), but they're not quite as easy to use as a shared_ptr [1].

    Then there is simil-shared_ptr implemented with thread-local counters (https://github.com/facebook/folly/blob/main/folly/experiment...).

    If you absolutely need a std::shared_ptr (which can be the case if you're working with pre-existing interfaces) there is CoreCachedSharedPtr (https://github.com/facebook/folly/blob/main/folly/concurrenc...), which uses an aliasing trick to transparently maintain per-core reference counts, and scales linearly, but it works only when acquiring the shared_ptr, any subsequent copies of that would still cause contention if passed around in threads.

    [1] Google has a proposal to make a smart pointer based on RCU/hazptr, but I'm not a fan of it because generally RCU/hazptr guards need to be released in the same thread that acquired them, and hiding them in a freely movable object looks like a recipe for disaster to me, especially if paired with coroutines https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2020/p05...

  • Ask HN: What are some of the most elegant codebases in your favorite language?
    37 projects | news.ycombinator.com | 17 Jun 2023
    Not sure if it's still the case but about 6 years ago Facebook's folly C++ library was something I'd point to for my junior engineers to get a sense of "good" C++ https://github.com/facebook/folly

chromium

Posts with mentions or reviews of chromium. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2024-03-06.
  • Demystifying the Shadow DOM
    1 project | news.ycombinator.com | 9 Apr 2024
    One of the unexpected use of shadow DOMs for me was a document generated for image resource URLs [1], because the HTML standard apparently specifies the exact DOM structure of the generated document except for the `` element [2].

    [1] https://github.com/chromium/chromium/blob/f02ca73/third_part...

    [2] https://html.spec.whatwg.org/multipage/document-lifecycle.ht...

  • Detect when your installed Chrome extensions have changed owners
    8 projects | news.ycombinator.com | 6 Mar 2024
    Recently my favorite open source mouse gestures extension SmartUp Gestures was taken over by some shady entity (with github no longer being updated of course).

    I opened Chrome ticket that they should ask to re-enable extension when ownership changes. They just closed the ticket replying with this link:

    https://chromium.googlesource.com/chromium/src/+/main/extens...

    :(

  • Supermium – Chromium fork for Win 2003 and newer
    6 projects | news.ycombinator.com | 3 Mar 2024
    Hmm. It looks like files with the .lnk or .pif file extension can only be downloaded on a user gesture: https://chromium.googlesource.com/chromium/src/+/39841e54180...

    So it can't be done silently. Although, I do wish the type was marked "DANGEROUS" a la dll files.

  • New Linux glibc flaw lets attackers get root on major distros
    7 projects | news.ycombinator.com | 4 Feb 2024
    On Linux, Chromium uses setuid or user namespaces to restrict the access of sandboxed components and seccomp-bpf to reduce the kernel attack surface.

    Check out the Chromium docs on this topic: https://chromium.googlesource.com/chromium/src/+/HEAD/docs/l...

  • Microsoft Edge ignores user wishes, slurps tabs from Chrome without permission
    7 projects | news.ycombinator.com | 31 Jan 2024
    You can also disable JIT in Firefox by setting javascript.options.baselinejit to false in about:config, although you won't get CET.

    [1] https://github.com/chromium/chromium/blob/12c232c43ce7324d30...

  • Apple Announces Changes to iOS, Safari, and the App Store in the European Union
    6 projects | news.ycombinator.com | 25 Jan 2024
    Chromium targets iOS already: https://chromium.googlesource.com/chromium/src/+/main/docs/i...
  • We build X.509 chains so you don't have to
    5 projects | news.ycombinator.com | 25 Jan 2024
  • Google Is Tracking You Even in Incognito Mode, New Disclaimer Is Up
    3 projects | news.ycombinator.com | 21 Jan 2024
    For the sake of completeness, I've traced the evolution of the notice over time:

    From 2008-07-26: "Going incognito doesn't affect the behavior of other people, servers, or software. Be wary of: / • Websites that collect or share information about you / • Internet service providers or employers that track the pages you visit / • Malicious software that tracks your keystrokes in exchange for free smileys / • Surveillance by secret agents / • People standing behind you" (https://chromium.googlesource.com/chromium/src/+/09911bf300f...)

    From 2013-12-07: "Going incognito doesn't affect the behavior of other people, servers, software, or people standing behind you." (https://chromium.googlesource.com/chromium/src/+/c5e36c57178...)

    From 2013-12-13: "However, you aren't invisible. Going incognito doesn't hide your browsing from your employer, your internet service provider, or the websites you visit." (https://chromium.googlesource.com/chromium/src/+/70821506825...)

    From 2014-02-27: "However, you aren't invisible. Going incognito doesn't hide your browsing from your employer, your internet service provider, governments and other sophisticated attackers, or the websites you visit." (https://chromium.googlesource.com/chromium/src/+/ab54bd65701...)

    From 2014-04-29: "Going incognito doesn't hide your browsing from your employer, your internet service provider, or the websites you visit." (https://chromium.googlesource.com/chromium/src/+/eb09a62ef40...)

    From 2016-01-15: "However, you aren't invisible. Going incognito doesn’t hide your browsing from your employer, your internet service provider, or the websites you visit." (https://chromium.googlesource.com/chromium/src/+/b7dac1a6a79...)

    From 2017-02-27: "Your activity might still be visible to: / • Websites you visit / • Your employer / • Your internet service provider" (https://chromium.googlesource.com/chromium/src/+/cfe102adddc...)

    From 2017-03-29: "Your activity might still be visible to: / • Websites you visit / • Your employer or school / • Your internet service provider" (https://chromium.googlesource.com/chromium/src/+/7ca3ccf74e8...)

    (Note that some of these were behind a feature flag for a few months.) Also, it looks like they've been intending to modify the new-tab page text for Incognito windows for some time, as part of the "Revamped Incognito NTP" project. You can view the modified text with 'chromium --enable-features=IncognitoNtpRevamp':

    From 2021-08-13: "What Incognito doesn't do / Incognito does not make you invisible online: / • Sites know when you visit them / • Employers or schools can track browsing activity / • Internet service providers may monitor web traffic" (https://chromium.googlesource.com/chromium/src/+/e6ae57ba385...)

    From 2022-01-25: "What Incognito doesn't do / Incognito does not make you invisible online: / • Sites and the services they use can see visits / • Employers or schools can track browsing activity / • Internet service providers can monitor web traffic" (https://chromium.googlesource.com/chromium/src/+/8b349f6c984...)

  • What Progressive Web App (PWA) Can Do Today
    5 projects | news.ycombinator.com | 8 Jan 2024
    Blink can now be compiled for iOS, but without JIT or WASM:

    https://chromium.googlesource.com/chromium/src/+/main/docs/i...

    https://bugs.chromium.org/p/chromium/issues/detail?id=141170...

  • People like me are why you shouldn't run a hosting company
    3 projects | news.ycombinator.com | 22 Dec 2023
    I think its weird that Vercel has this limit. There is no practical reason I can think of for having such a limit on URL characters that is so small. Chrome suggests a 2MB limit[0] for example. The platform itself doesn't have one, and Firefox I believe if memory serves (I can't find the source for this claim atm) is 1 MB effectively, and I don't think Safari is any lower than that either (and may well be more inline with Chrome on this, at 2 MB)

    [0]: https://chromium.googlesource.com/chromium/src/+/master/docs...

What are some alternatives?

When comparing Folly and chromium you can also consider the following projects:

abseil-cpp - Abseil Common Libraries (C++)

ungoogled-chromium - Google Chromium, sans integration with Google

Boost - Super-project for modularized Boost

WebKit - Home of the WebKit project, the browser engine used by Safari, Mail, App Store and many other applications on macOS, iOS and Linux.

Seastar - High performance server-side application framework

termux-packages - A package build system for Termux.

parallel-hashmap - A family of header-only, very fast and memory-friendly hashmap and btree containers.

bromite - Bromite is a Chromium fork with ad blocking and privacy enhancements; take back your browser!

EASTL - Obsolete repo, please go to: https://github.com/electronicarts/EASTL

brave-browser - Brave browser for Android, iOS, Linux, macOS, Windows.

OpenFrameworks - openFrameworks is a community-developed cross platform toolkit for creative coding in C++.

gecko-dev - Read-only Git mirror of the Mercurial gecko repositories at https://hg.mozilla.org. How to contribute: https://firefox-source-docs.mozilla.org/contributing/contribution_quickref.html