Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Seems to me that one interesting approach would be to automatically rewrite a program in continuation-passing style, and then use callbacks (the lowest-overhead approach) where the callback is the continuation.

It ought to compile pretty cleanly, since a continuation can end up being compiled into an address.



I've thought about this too, and it might be the route C++ takes. That being said, to resume you need to wind through all your function calls executing parts of the state machine, it might actually be slower.

That being said, I'm sure there are different ways to implement it and I look forward to proposed faster/efficient implementations.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: