whew, the numbers were looking terrible for sycalls, but it was just the app being off by a factor of 1000.

It's still somewhat slower, but workable. null syscall speed on p3 500:
haiku  6800 nanosecs
beosr5 2200 nanosecs
linux  680  nanosecs


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20071 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Travis Geiselbrecht 2007-02-04 21:57:56 +00:00
parent bee597ebfb
commit 5c3d21086c
1 changed files with 3 additions and 3 deletions

View File

@ -56,13 +56,13 @@ main(int argc, char *argv[])
libcall = test_func((void *)&getpid); // getpid is currently implemented as a library function returning the value of a global libcall = test_func((void *)&getpid); // getpid is currently implemented as a library function returning the value of a global
syscall = test_func((void *)&is_computer_on); syscall = test_func((void *)&is_computer_on);
printf("overhead time: %ld microseconds\n", printf("overhead time: %ld nanoseconds\n",
(1000*(overhead))/ITERATIONS); (1000*(overhead))/ITERATIONS);
printf("libcall time: %ld microseconds\n", printf("libcall time: %ld nanoseconds\n",
(1000*(libcall-overhead))/ITERATIONS); (1000*(libcall-overhead))/ITERATIONS);
printf("syscall time: %ld microseconds\n", printf("syscall time: %ld nanoseconds\n",
(1000*(syscall-overhead))/ITERATIONS); (1000*(syscall-overhead))/ITERATIONS);
return (0); return (0);