Sync libc/stdlib with FreeBSD (ignoring jemalloc, pts, and gdtoa):
[dragonfly.git] / test / sysperf / call2.c
blob1da21898d6a39d8b0868dae77b7fa7932108a929
1 /*
2 * call2.c
4 * Test a standard function call to a function which does nothing much.
6 * $DragonFly: src/test/sysperf/call2.c,v 1.2 2005/08/02 17:11:04 hmp Exp $
7 */
9 #include "blib.h"
11 #define LOOP 1000000000
13 static void nop(void) { }
15 static void (*nop_ptr)(void) = nop;
17 int
18 main(int ac, char **av)
20 int i;
22 printf("call nop() function through function pointer in loop\n");
23 start_timing();
24 for (i = 0; i < LOOP; ++i)
25 nop_ptr();
26 stop_timing(LOOP, "loop1/user");
27 return(0);