From mboxrd@z Thu Jan 1 00:00:00 1970 MIME-Version: 1.0 Date: Fri, 3 Sep 2010 22:14:35 -0700 Message-ID: From: ron minnich To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net> Content-Type: text/plain; charset=ISO-8859-1 Subject: [9fans] too many system calls. Topicbox-Message-UUID: 4ef901fa-ead6-11e9-9d60-3106f5b1d025 Glibc /bin/date on Linux runs around 140 system calls. A quick pass with ratrace shows that plan 9 /bin/date has 10. The conclusion is clear: plan 9 date has way too much overhead. It's 1/14 the number of system calls of Glibc; why's it so big? A quick pass on getpid() fixes the problem: #include #include #include int getpid(void) { return _tos->pid; } Now we're down to seven system calls. 1/20 of glibc. Much better! :-) ron