tests: add noop to fixed-benchmark
authorPekka Paalanen <ppaalanen@gmail.com>
Tue, 15 May 2012 07:29:12 +0000 (10:29 +0300)
committerKristian Høgsberg <krh@bitplanet.net>
Tue, 15 May 2012 15:00:19 +0000 (11:00 -0400)
commit32ec041333fd6075e5dfeb7797b6d68f88f5e0aa
treee9b1b1467b9b3b02443dada4966252acab8f51a0
parentf5df38959b14426f648b3359821457786e43e396
tests: add noop to fixed-benchmark

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>
tests/fixed-benchmark.c