libaco, a blazing fast and lightweight C asymmetric coroutine library. Along with the implementation of a production-ready C coroutine library, here is detailed documentation about how to implement the fastest and correct coroutine library and also with strict mathematical proof. It has no more than 700 LOC but has the full functionality which you may want from a coroutine library. The benchmark part shows that a context switch between coroutines only takes about 10 ns (in the case of the standalone stack) on the AWS c5d.large machine. User could choose to create a new coroutine with a standalone stack or with a shared stack (could be shared with others). It is extremely memory-efficient, 10,000,000 coroutines simultaneously to run cost only 2.8 GB physical memory (run with tcmalloc, each coroutine has a 120B copy-stack size configuration). The phrase "fastest" in above means the fastest context switching implementation which complies to the Sys V ABI of Intel386 or AMD64.

Features

  • Currently supports Sys V ABI of Intel386
  • Currently supports Sys V ABI of x86-64
  • It has no more than 700 LOC
  • The benchmark part shows that a context switch between coroutines only takes about 10 ns
  • Create a new coroutine with a standalone stack
  • It is extremely memory efficient

Project Samples

Project Activity

See All Activity >

Categories

Libraries

License

Apache License V2.0

Follow libaco

libaco Web Site

Other Useful Business Software
Enterprise-grade ITSM, for every business Icon
Enterprise-grade ITSM, for every business

Give your IT, operations, and business teams the ability to deliver exceptional services—without the complexity.

Freshservice is an intuitive, AI-powered platform that helps IT, operations, and business teams deliver exceptional service without the usual complexity. Automate repetitive tasks, resolve issues faster, and provide seamless support across the organization. From managing incidents and assets to driving smarter decisions, Freshservice makes it easy to stay efficient and scale with confidence.
Try it Free
Rate This Project
Login To Rate This Project

User Reviews

Be the first to post a review of libaco!

Additional Project Details

Operating Systems

Linux, Mac

Programming Language

C

Related Categories

C Libraries

Registered

2022-05-02