5

I really want to put more in the body to explain the question… but the title really covers it all. As far as I can suss, librt is more “official” (it’s a standard part of libc?), but I also remember seeing that Node.js uses libeio. Which should I spend more time looking into? What about portability? How different are their APIs?

(I’d appreciate it if somebody with ≥1,500 rep could add the tags “libeio” and “librt” to this question, as I cannot.)

hippietrail
  • 15,848
  • 18
  • 99
  • 158
ELLIOTTCABLE
  • 17,185
  • 12
  • 62
  • 78

1 Answers1

3

libeio wraps standard calls in threads, and handles a large swath of the common system calls.

librt only has a few calls -- read and write, but not, for example, stat.

aredridel
  • 1,532
  • 14
  • 19
  • Hm. In many cases, though, it seems (from the documentation) that `librt` may be hardware-supported, instead of simply put together with judicious application of `pthread`s. Wouldn’t that imply `librt` has much more potential to be performant? – ELLIOTTCABLE Mar 10 '11 at 08:01
  • In theory, yes. But it's probably hard to do much better than a good thread-based implementation. – R.. GitHub STOP HELPING ICE Mar 10 '11 at 14:48