summaryrefslogtreecommitdiff
path: root/benchtests/bench-skeleton.c
AgeCommit message (Collapse)Author
2016-01-04Update copyright dates with scripts/update-copyrights.Joseph Myers
2015-09-18Add a new benchmark for isinf/isnan/isnormal/isfinite/fpclassify. The test ↵Wilco Dijkstra
uses 2 arrays with 1024 doubles, one with 99% finite FP numbers (10% zeroes, 10% negative) and 1% inf/NaN, the other with 50% inf, and 50% Nan. ChangeLog: 2015-09-18 Wilco Dijkstra <wdijkstr@arm.com> * benchtests/Makefile: Add bench-math-inlines, link with libm. * benchtests/bench-math-inlines.c: New benchmark. * benchtests/bench-util.h: New file. * benchtests/bench-util.c: New file. * benchtests/bench-skeleton.c: Add include of bench-util.c/h.
2015-01-02Update copyright dates with scripts/update-copyrights.Joseph Myers
2014-05-26benchtests: Add new directive for benchmark initialization hookSiddhesh Poyarekar
Add a new 'init' directive that specifies the name of the function to call to do function-specific initialization. This is useful for benchmarks that need to do a one-time initialization before the functions are executed.
2014-04-11benchtests: Improve readability of JSON outputWill Newton
Add a small library to print JSON values and use it to improve the readability of the benchmark output and the readability of the benchmark code. ChangeLog: 2014-04-11 Will Newton <will.newton@linaro.org> * benchtests/Makefile (extra-objs): Add json-lib.o. (bench-func): Tidy up JSON output. * benchtests/bench-skeleton.c: Include json-lib.h. (main): Use JSON library functions to do output of benchmark results. * benchtests/bench-timing-type.c (main): Output the timing type simply, leaving formatting to the user. * benchtests/json-lib.c: New file. * benchtests/json-lib.h: Likewise.
2014-03-29Detailed benchmark outputs for functionsSiddhesh Poyarekar
This patch adds an option to get detailed benchmark output for functions. Invoking the benchmark with 'make DETAILED=1 bench' causes each benchmark program to store a mean execution time for each input it works on. This is useful to give a more comprehensive picture of performance of functions compared to just the single mean figure.
2014-03-29Make bench.out in json formatSiddhesh Poyarekar
This patch changes the output format of the main benchmark output file (bench.out) to an extensible format. I chose JSON over XML because in addition to being extensible, it is also not too verbose. Additionally it has good support in python. The significant change I have made in terms of functionality is to put timing information as an attribute in JSON instead of a string and to do that, there is a separate program that prints out a JSON snippet mentioning the type of timing (hp_timing or clock_gettime). The mean timing has now changed from iterations per unit to actual timing per iteration.
2014-01-01Update copyright notices with scripts/update-copyrightsAllan McRae
2013-09-11benchtests: Rename argument to TIMING_INIT macro.Will Newton
The TIMING_INIT macro currently sets the number of loop iterations to 1000, which limits usefulness. Make the argument a clock resolution value and multiply by 1000 in bench-skeleton.c instead to allow easier reuse. ChangeLog: 2013-09-11 Will Newton <will.newton@linaro.org> * benchtests/bench-timing.h (TIMING_INIT): Rename ITERS parameter to RES. Remove hardcoded 1000 value. * benchtests/bench-skeleton.c (main): Pass RES parameter to TIMING_INIT and multiply result by 1000.
2013-05-13Use HP_TIMING for benchmarks if availableSiddhesh Poyarekar
HP_TIMING uses native timestamping instructions if available, thus greatly reducing the overhead of recording start and end times for function calls. For architectures that don't have HP_TIMING available, we fall back to the clock_gettime bits. One may also override this by invoking the benchmark as follows: make USE_CLOCK_GETTIME=1 bench and get the benchmark results using clock_gettime. One has to do `make bench-clean` to ensure that the benchmark programs are rebuilt.
2013-05-10Fix coding styleSiddhesh Poyarekar
2013-05-08Preheat CPU in benchtests.Ondrej Bilka
A benchmark could be skewed by CPU initialy working on minimal frequency and speeding up later. We first run code in loop to partialy fix this issue.
2013-04-30Allow multiple input domains to be run in the same benchmark programSiddhesh Poyarekar
Some math functions have distinct performance characteristics in specific domains of inputs, where some inputs return via a fast path while other inputs require multiple precision calculations, that too at different precision levels. The way to implement different domains was to have a separate source file and benchmark definition, resulting in separate programs. This clutters up the benchmark, so this change allows these domains to be consolidated into the same input file. To do this, the input file format is now enhanced to allow comments with a preceding # and directives with two # at the begining of a line. A directive that looks like: tells the benchmark generation script that what follows is a different domain of inputs. The value of the 'name' directive (in this case, foo) is used in the output. The two input domains are then executed sequentially and their results collated separately. with the above directive, there would be two lines in the result that look like: func(): .... func(foo): ...
2013-04-30Maintain runtime of each benchmark at ~10 secondsSiddhesh Poyarekar
The idea to run benchmarks for a constant number of iterations is problematic. While the benchmarks may run for 10 seconds on x86_64, they could run for about 30 seconds on powerpc and worse, over 3 minutes on arm. Besides that, adding a new benchmark is cumbersome since one needs to find out the number of iterations needed for a sufficient runtime. A better idea would be to run each benchmark for a specific amount of time. This patch does just that. The run time defaults to 10 seconds and it is configurable at command line: make BENCH_DURATION=5 bench
2013-03-15Framework for performance benchmarking of functionsSiddhesh Poyarekar
See benchtests/Makefile to know how to use it.