4 * Test a standard function call to a function which does nothing much.
6 * $DragonFly: src/test/sysperf/call3.c,v 1.1 2004/03/20 01:51:01 dillon Exp $
11 #define LOOP 500000000
13 static void nop1(void) { }
14 static void nop2(void) { }
15 static void nop(void (*func)(void)) { func(); }
18 main(int ac, char **av)
22 printf("call nop() function through function pointer in loop\n");
24 for (i = 0; i < LOOP; ++i) {
28 stop_timing(LOOP * 2, "call3/nop1-1");
30 for (i = 0; i < LOOP; ++i) {
34 stop_timing(LOOP * 2, "call3/nop1-2");
36 for (i = 0; i < LOOP; ++i) {
40 stop_timing(LOOP * 2, "call3/nop2-2");