This file contains hidden or 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
//sample output: | |
//[benchmark_func] modulo branchless: 1000000 iters in 0.045876s min, 0.048180s max, 0.046400s avg | |
//[benchmark_func] modulo basic: 1000000 iters in 0.025224s min, 0.025544s max, 0.025335s avg | |
//[benchmark_func] manual print: 1000000 iters in 0.043660s min, 0.044033s max, 0.043822s avg | |
//[benchmark_func] modulo lookup: 1000000 iters in 0.109280s min, 0.110357s max, 0.109678s avg | |
//[benchmark_func] modulo multiply: 1000000 iters in 0.109537s min, 0.110182s max, 0.109707s avg | |
//[benchmark_func] stack print: 1000000 iters in 0.276515s min, 0.280833s max, 0.278486s avg | |
#include <stdio.h> | |
#include <stdlib.h> |
OlderNewer