Hacker News new | past | comments | ask | show | jobs | submit login
No more Heisenbugs: lock-free fast logging library (github.com/undoio)
2 points by gregthelaw 11 months ago | hide | past | favorite | 1 comment



Sometimes printf debugging is all you have available. But printf can be lousy for debugging race conditions because it's pretty slow and worse, libc's printf takes a lock and so introduces a synchronisation point. So I made a simple library that is both fast (~5ns on a half-decent machine) and lock-free.

It doesn't completely defeat the Heisenberg principle of course, but you can in practice add a decent amount of logging without affecting timing in a meaningful way.

Enjoy!




Consider applying for YC's Spring batch! Applications are open till Feb 11.

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

Search: