@@ -72,6 +72,27 @@ static void BM_aero_sin_12(benchmark::State &state) {
7272 free (out);
7373}
7474
75+
76+ static void BM_aero_fast_sin_12 (benchmark::State &state) {
77+ float *in = aerobus::aligned_malloc<float >(state.range (0 ), 64 );
78+ float *out = aerobus::aligned_malloc<float >(state.range (0 ), 64 );
79+ #pragma omp parallel for
80+ for (int64_t i = 0 ; i < state.range (0 ); ++i) {
81+ in[i] = rand (-0.01 , 0.01 );
82+ }
83+ for (auto _ : state) {
84+ #pragma omp parallel for
85+ for (int64_t i = 0 ; i < state.range (0 ); ++i) {
86+ out[i] = aerobus::libm::fast_sin (aerobus::libm::fast_sin (aerobus::libm::fast_sin (
87+ aerobus::libm::fast_sin (aerobus::libm::fast_sin (aerobus::libm::fast_sin (
88+ aerobus::libm::fast_sin (aerobus::libm::fast_sin (aerobus::libm::fast_sin (in[i])))))))));
89+ }
90+ }
91+
92+ free (in);
93+ free (out);
94+ }
95+
7596static void BM_std_sin_12 (benchmark::State &state) {
7697 double *in = aerobus::aligned_malloc<double >(state.range (0 ), 64 );
7798 double *out = aerobus::aligned_malloc<double >(state.range (0 ), 64 );
@@ -208,12 +229,17 @@ static void BM_horner_double(benchmark::State &state) {
208229
209230BENCHMARK (BM_std_cos_12)->Range(1 << 10 , 1 << 24 );
210231BENCHMARK (BM_aero_cos_12)->Range(1 << 10 , 1 << 24 );
232+
211233BENCHMARK (BM_std_sin_12)->Range(1 << 10 , 1 << 24 );
212234BENCHMARK (BM_aero_sin_12)->Range(1 << 10 , 1 << 24 );
235+ BENCHMARK (BM_aero_fast_sin_12)->Range(1 << 10 , 1 << 24 );
236+
213237BENCHMARK (BM_std_expm1_12)->Range(1 << 10 , 1 << 24 );
214238BENCHMARK (BM_aero_expm1_12)->Range(1 << 10 , 1 << 24 );
239+
215240BENCHMARK (BM_std_hermite)->Range(1 << 10 , 1 << 24 );
216241BENCHMARK (BM_aero_hermite)->Range(1 << 10 , 1 << 24 );
242+
217243BENCHMARK (BM_horner_double)->Range(1 << 10 , 1 << 24 );
218244BENCHMARK (BM_compensated_horner_float)->Range(1 << 10 , 1 << 24 );
219245
0 commit comments