speeduino/test
tx_haggis 9ad500189b
Performance: 15%+ loop/sec speedup by optimising 3d table bilinear interpolation (#735)
* Bi-linear interpolation - round towards nearest integer

Add the equivalent of 0.5 to the final calculation pre-rounding.
This will have the effect of rounding to the nearest integer, rather
than truncating. I.e. rounding down

* Unit tests: isolate table tests and check interpolation x/y bins

* Unit tests: add native table3d tests

* Unit tests: derive min/max from axis test values

* Unit tests: more detailed messages

* Unit tests: fix rounding & unit tests

* Performance

* Performance: use uint16_t instead of unsigned long
for the fixed point math: we only need the fractional
part. I.e. 1.16 not 16.16

* Use narrowest possible type

* Optimise bin position logic for performance

* Only promote to uint32_t when really required.

* Simplify bin checks - no zero width bins

* Save memory: use a single byte for the last bin caches

* Performance: increment pointers instead of
repeatedly dereferncing array by index.

* Comments

* Incorrect array underrun logic

* Rename type, comments

* Fix unit tests
2021-12-09 20:40:31 +11:00
..
test_decoders Major revamp of unit testing framework 2020-11-19 21:38:00 +11:00
test_misc Performance: 15%+ loop/sec speedup by optimising 3d table bilinear interpolation (#735) 2021-12-09 20:40:31 +11:00
test_schedules Fix for OUTPUT test failing due to random pin assignments 2021-10-05 11:15:14 +11:00
test_table3d_native Performance: 15%+ loop/sec speedup by optimising 3d table bilinear interpolation (#735) 2021-12-09 20:40:31 +11:00