MCPcopy Create free account
hub / github.com/codr7/hacktical-c / fix_benchmarks

Function fix_benchmarks

fix/benchmarks.c:4–26  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2#include "fix.h"
3
4void fix_benchmarks() {
5 hc_time_t t;
6 const int n = 100000;
7
8 t = hc_now();
9 double dv = 0;
10
11 for (int i = 0; i < n; i++) {
12 dv += 0.001;
13 }
14
15 hc_time_print(&t, "double: ");
16
17 t = hc_now();
18 hc_fix_t fv = hc_fix(3, 0);
19 hc_fix_t fd = hc_fix(3, 1);
20
21 for (int i = 0; i < n; i++) {
22 fv = hc_fix_add(fv, fd);
23 }
24
25 hc_time_print(&t, "fix: ");
26}

Callers 1

mainFunction · 0.85

Calls 4

hc_nowFunction · 0.85
hc_time_printFunction · 0.85
hc_fixFunction · 0.85
hc_fix_addFunction · 0.85

Tested by

no test coverage detected