4 ms·
This is pretty cool, good job! // A sqrt function I got from the web that uses integers only (since Pebble emulates floating point math)" [1] Pebble
by wyldfire 11y ago
This is pretty cool, good job!
// A sqrt function I got from the web that
uses integers only (since Pebble emulates floating point math)" [1]
Pebble has a soft-float implementation? So is this integer sqrt approximation is faster than the soft-float one?
[1] https://github.com/PebbleSeizureDetect/PebbleSeizureDetect/blob/f7e68491de88ed29571ce47805e528dc21d2cfb6/main.c#L347 https://github.com/PebbleSeizureDetect/PebbleSeizureDetect/b...
- devbent 11y agoI've used both, integer square root is typically much faster than floating point emulation. Really almost anything is faster than FP emulation.