Settings

Theme

Show HN: CSP Benchmarks – Go vs. core.async (Clojure) vs. libgoc (C)

github.com

2 points by divs1210 14 days ago · 2 comments · 1 min read

Reader

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!

puredanger 4 days ago

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.

dinarino 14 days ago

I did something similar on CSP, it was pure hell.

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection