Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kprotty/zap
An asynchronous runtime with a focus on performance and resource efficiency.
https://github.com/kprotty/zap
asynchronous io networking performance runtime rust scheduler unix windows zig
Last synced: 30 days ago
JSON representation
An asynchronous runtime with a focus on performance and resource efficiency.
- Host: GitHub
- URL: https://github.com/kprotty/zap
- Owner: kprotty
- License: mit
- Created: 2019-07-23T16:50:25.000Z (over 5 years ago)
- Default Branch: blog
- Last Pushed: 2024-08-24T16:06:51.000Z (3 months ago)
- Last Synced: 2024-10-02T07:04:18.116Z (about 1 month ago)
- Topics: asynchronous, io, networking, performance, runtime, rust, scheduler, unix, windows, zig
- Language: Zig
- Homepage: https://github.com/kprotty/zap
- Size: 8.19 MB
- Stars: 428
- Watchers: 17
- Forks: 16
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE-MIT
Awesome Lists containing this project
- awesome-zig - kprotty/zap
- awesome-zig - zapποΈAn asynchronous runtime with a focus on performance and resource efficiency
README
zap [![License](https://img.shields.io/badge/license-MIT-8FBD08.svg)](https://shields.io/)
====
Designing efficient task scheduling for Ziglang.## Goals
So I originally started this project around 2019 in order to develop memory, threads, io, and synchronization primitives for Zig given they were lacking at the time. Over the months, it shifted more on developing a runtime (or thread pool rather) that was both resource efficient (one of Zig's, and my personal, implicit Zen's) and competitive in performance with existing implementations.Here lies the result of that effort for now. There's still more experimenting to do like how to dispatch I/O efficiently and the like, but I'm happy with what has come and wanted to share. You can find a copy of the blogpost [in this repo](blog.md), the reference implementation in [src](src/thread_pool.zig), and some of my [previous attempts](zap/tree/old_branches) in their own branch.
## Benchmarks
To benchmark the implementation, I wrote some quicksort implementations for similar APIs in other languages. The reasoning behind quicksort is that it's fairly practical and can also be heavy with concurrency. Try running them locally!