This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Simple function parameter passing style speed test. | |
// Compiled with | |
// gcc -O2 -DBUILD_FUNCS -Wall bench.c -c -o funcs.o; gcc -O2 -Wall bench.c funcs.o -o bench | |
// Some notes: | |
// Split into two modules to allow realistic -O2 without the compiler being able to avoid doing any work at all. | |
// Includes the variable argc input and returns the sum for the same reason. | |
// f_no_params is used as a control for loop overhead. | |
#include <time.h> | |
#include <stdio.h> |