aboutsummaryrefslogtreecommitdiffstats
path: root/tests/fixed-benchmark.c
Commit message (Collapse)AuthorAgeFilesLines
* tests: drop misleading fixed-benchmarkManuel Stoeckl2023-05-031-107/+0
| | | | | | | | | | | Because this benchmark performed wl_fixed_to_double conversions on a long sequence of consecutive integers, the compiler could optimize away the addition performed in wl_fixed_to_double, merging it with the loop iteration code. This made tests/fixed-benchmark.c significantly underestimate the actual cost of the current wl_fixed_to_double implementation. Signed-off-by: Manuel Stoeckl <code@mstoeckl.com>
* fixed-benchmark: remove unused arguments in mainMarek Chalupa2015-07-101-1/+1
| | | | | | | | Fixed benchmark uses main(int argc, char *argv[]) but does not use the arguments, so we can replace them with void Signed-off-by: Marek Chalupa <mchqwerty@gmail.com> Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
* tests: Update boilerplate from MIT X11 license to MIT Expat licenseBryce Harrington2015-06-121-16/+19
| | | | | Signed-off-by: Bryce Harrington <bryce@osg.samsung.com> Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
* tests: fix make check for out-of-tree buildsDylan Noblesmith2012-06-301-1/+1
| | | | | | | | | | It was failing with missing include files. While here, destroy the ugly "../src/..." include paths used in the tests that was just hacking around this problem in the Makefile: sed -i s/..\\/src\\/// tests/*.c
* tests: add noop to fixed-benchmarkPekka Paalanen2012-05-151-0/+16
| | | | | | | | | | | | | | | | | | | I was just curious of how much the looping takes time without conversion, so I added this. My results on Intel(R) Core(TM) i5-2410M CPU @ 2.30GHz: benchmarked noop: 1.876349827s benchmarked magic: 2.245844470s benchmarked div: 12.709085309s benchmarked mul: 7.504838141s Mul seems to take 15x the time magic does, cool! Btw. the simple default cast of int32_t to double is slower than magic for me, hence the use of union. Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
* Optimize wl_fixed_t to/from double conversion functionsKristian Høgsberg2012-05-141-0/+88