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

It's `fork` in particular which is much slower. It has to fiddle with Mach port rights, doesn't do overcommit, etc. And autotools is very fork heavy.

Apple provides posix_spawn which is much much faster. Running /usr/bin/false 1000 times in the fish shell is nearly twice as fast (2.25s to 1.25s) when using posix_spawn instead of fork, on the Mac.

Autotools doesn't use posix_spawn because there's no benefit on Linux, but it is what Apple's frameworks use internally for process launching.



> Autotools doesn't use posix_spawn because there's no benefit on Linux

Wait, autotools don't make syscalls at all, do they? I thought it's just shell and make.

Is the problem that /bin/sh and /usr/bin/make use fork and it would help to have a Bourne shell and GNU-compatible make that used posix_spawn?




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

Search: