Hacker News new | ask | show | jobs
by Asmod4n 62 days ago
Apple also has no api to write a fast server.

Libdispatch is a burden to use for a server because of its book keeping overhead, and their history with kqueue makes it hard to convince someone to use it.

1 comments

Isn’t kqueue pretty much as fast as epoll?

There’s no io_uring, but in practice, almost all servers run epoll anyway, don’t they?

epoll isn’t very fast, kqueue is indeed much faster as a primitive.

MacOS’s implementation is an order of magnitude or more slower than (say) FreeBSD though, so its not a valid comparison that the syscall simply exists.

Another example of a syscall performing differently would be gettimeofday() in OpenBSD vs linux, its an extremely cheap operation in Linux but quite costly in OpenBSD despite being identical at the kernel boundary.

epoll is kinda slow compared to io_uring, I am typically getting double the perf just switching to uring.