time-to-botec/C-optimized
2023-05-29 17:50:32 -04:00
..
out reorg: put output in its own folder. 2023-05-29 17:50:32 -04:00
makefile reorg: put output in its own folder. 2023-05-29 17:50:32 -04:00
README.md Update README.md 2023-05-29 23:30:07 +02:00
samples.c tweak: link math library. 2023-05-29 17:47:52 -04:00
samples.txt Added C-optimized version of the code 2023-05-29 23:17:07 +02:00

C-Optimized

An optimized version of the original C implementation.
The main changes are an optimization of the mixture function (it passes the functions instead of the whole arrays, reducing in great measure the memory usage and the computation time) and the implementation of multi-threading with OpenMP.

The mean time of execution is 6 ms. With the following distribution: Time histogram
Take into account that the multi-threading introduces a bit of dispersion in the execution time due to the creation and destruction of threads. Also, the time data has been collected by executing the interior of the main() function 1000 times in a for loop, not executing the program itself 1000 times.

The hardware used has been an AMD 5800x3D and 16GB of DDR4-3200 MHz.