4 * Test a standard function call to a function which does nothing much.
6 * $DragonFly: src/test/sysperf/call3.c,v 1.3 2005/08/02 17:11:04 hmp Exp $
11 #define LOOP 500000000
14 static void xnop1(void) { }
16 static void xnop2(void) { }
18 static void xnop(void (*func
)(void)) { func(); }
21 main(int ac
, char **av
)
25 printf("call nop() function through function pointer in loop\n");
27 for (i
= 0; i
< LOOP
; ++i
) {
31 stop_timing(LOOP
* 2, "call3/nop1-1");
33 for (i
= 0; i
< LOOP
; ++i
) {
37 stop_timing(LOOP
* 2, "call3/nop1-2");
39 for (i
= 0; i
< LOOP
; ++i
) {
43 stop_timing(LOOP
* 2, "call3/nop2-2");