Recent submissions

Comment · 13 years ago
Why less memory than segmented stacks?

Lthread is a cool experiment but coroutines in C is a dubious ideal. If you're writing a program in C/C++, presumably you want ultimate control and the fastest possible execution. You wouldn't introduce extra runtime complexity and a speed hit for easier to use APIs (blocking I/O functions). You'd just use epoll and non-blocking sockets (or libuv). That's not to say that coroutines/green threads/goroutines in high-level languages where you've already decided to take a speed hit for easier use isn't useful. Said another way: if your concern is about easy to read code, C is not the right choice; if your concern is speed: copying a stack on every i/o function is not the right choice.

Comment · 13 years ago
Comment · 13 years ago
digressing from luvit...

how does the stack copying technique (as used in lthread) compare to segmented stacks (as used in go)? The swap technique is very simple but I would assume that the stack copy shows up in profiles and is significantly slower than the segmented stack technique... Are there any benchmarks?

Comment · 14 years ago
it's a build dependency not a runtime dependency
Comment · 14 years ago
I don't know any drug dealers who take that.
Comment · 15 years ago
Using libuv from Node.js too. Awesome.
Comment · 15 years ago
Comment · 15 years ago

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton