Show HN: CSP Benchmarks – Go vs. core.async (Clojure) vs. libgoc (C) (github.com)
Hi, HN!
Author of libgoc here.
I made a CSP library in C along with async I/O and HTTP client/server layers.
It is blazing fast, beating Go and Clojure at several benchmarks.
The library is stable, and has an extensive test suite.
I have several optimizations and features planned, all logged as issues in the github repo.
libgoc currently uses void* extensively and is ducktyped, but this will eventually change when STC generics will be integrated.
Two most important features are:
- it provides cross-platform cooperative threads (goroutines / virtual threads / fibers) in C
- it exposes a very user friendly async I/O C interface to libuv
I'll be happy to answer questions!
3 comments
[ 2.8 ms ] story [ 16.7 ms ] threadHappy you find it cool!
I will update the Clojure and core.async versions to latest.
You're right I forgot to mention the JVM version in the benchmarks.
I'll be running fresh benchmarks once the current task I'm working on is done.
I will have to look into io-thread, not familiar with it.
Although my aim with the benchmarks is to have nearly identical code for all platforms without any platform-specific optimizations - I'm not sure yet how io-thread plays into that.
Will definitely add the JVM version and update Clojure dependencies and let you know when I have fresh benchmarks.