context VS stack-switching

Compare context vs stack-switching and see what are their differences.

InfluxDB - Power Real-Time Data Analytics at Scale
Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
www.influxdata.com
featured
SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
www.saashub.com
featured
context stack-switching
3 2
280 102
1.1% 0.0%
5.7 10.0
7 days ago about 1 year ago
Assembly WebAssembly
- GNU General Public License v3.0 or later
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.

context

Posts with mentions or reviews of context. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2023-09-24.
  • Fiber in C++: Understanding the Basics
    8 projects | news.ycombinator.com | 24 Sep 2023
    https://github.com/boostorg/context/blob/6fa6d5c50d120e69b2d...

    ...and this causes problems, because it can't guarantee that all fields are initialized or switched successfully: https://lists.boost.org/boost-bugs/2014/10/38476.php

    Microsoft continually adds and changes fields in the TIB with each new release of Windows. Attempting to implement fibers manually is a ticking time bomb that should never be used in production.

  • History of non-standard-layout class layouts
    1 project | /r/cpp | 7 Mar 2022
    Marginally disagree. Lots of optimization work takes advantage of knowing how the ABI works. Knowing you can pass two register returns on SysV is a particularly common optimization point. Writing context switching routines that can be reliably ported (ex, boost-context) requires this consistency of ABI. As a final example, cache locality optimizations require the ability to reason about ABI layout.
  • How do you implement green threads?
    1 project | /r/cpp_questions | 24 Mar 2021

stack-switching

Posts with mentions or reviews of stack-switching. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2023-09-24.
  • WasmFX: Effect Handlers for WebAssembly
    1 project | news.ycombinator.com | 7 Nov 2023
    I first heard of algebraic effects in a presentation about Unison recorded at Strangeloop. Realizing that exceptions, async, generators, and continuations could all be unified and implemented on top of one language feature was mind expanding.

    It looks like the juicy details are in the Explainer:

    https://github.com/WebAssembly/stack-switching/blob/main/pro...

  • Fiber in C++: Understanding the Basics
    8 projects | news.ycombinator.com | 24 Sep 2023
    "Fibers", "green threads", "stack switching", "cooperative multitasking" are essentially all the same thing, they all rely on being able to switch to a different stack within the same OS thread. As such they can be implemented either in user space or by the OS.

    Only downside of the technique is that it cannot be implemented in WASM, because WASM has separate data- and call-stacks and the call stack is not accessible from within the WASM virtual machine (while 'async-await' which relies on code transformation can be implemeneted in WASM just fine).

    There is a 'stack-switching proposal' for WASM though, but I don't know how what's the state of that:

    https://github.com/WebAssembly/stack-switching

What are some alternatives?

When comparing context and stack-switching you can also consider the following projects:

ghost-userspace

marl - A hybrid thread / fiber task scheduler written in C++ 11

cgreenlet - Coroutines for C/C++

assembly - assembly projects

gruvi - Async IO for Python, Simplified

llvm-project - The LLVM Project is a collection of modular and reusable compiler and toolchain technologies.