Show HN: CSP Benchmarks – Go vs. core.async (Clojure) vs. libgoc (C)
github.comHi, 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! This is very cool, glad to see it! I couldn’t figure out which version of the JVM you used for the core.async tests? Also, you are using old versions of both Clojure and core.async which have both had optimizations in the last year that should help all of these. Some of these tests may also be helped by using io-thread (with JVM virtual threads) instead of go in latest core.async. I did something similar on CSP, it was pure hell.