Mercurial > vec
comparison test/test_benchmark_simple.c @ 37:4b5a557aa64f
*: turns out extern is a practical joke. rewrite to be always inline again
the sample benchmark performs about 3x as well with optimizations
disabled :)
author | Paper <paper@tflc.us> |
---|---|
date | Sat, 26 Apr 2025 01:04:35 -0400 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
36:677c03c382b8 | 37:4b5a557aa64f |
---|---|
1 #include <stdint.h> | |
2 | |
3 extern void test_benchmark_sample_minmax_simple_impl(int16_t *smpl, | |
4 uint32_t length, int32_t *pmin, int32_t *pmax) | |
5 { | |
6 int32_t min = *pmin; | |
7 int32_t max = *pmax; | |
8 | |
9 while (length--) { | |
10 if (*smpl < min) min = *smpl; | |
11 if (*smpl > max) max = *smpl; | |
12 | |
13 smpl++; | |
14 } | |
15 | |
16 *pmin = min; | |
17 *pmax = max; | |
18 } |