Go Down

Topic: divmod10() : a fast replacement for /10 and %10 (unsigned) (Read 23 times) previous topic - next topic

robtillaart

update
replace n += print(".");   with    n += print('.');

Time=1072  << original 2144 is 50% off
Rob Tillaart

Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -
(Please do not PM for private consultancy)

Coding Badly


Does this make any difference...
Code: [Select]
n += write('.');

robtillaart



Does this make any difference...
Code: [Select]
n += write('.');

not measurable with the test script, but removing some "stacked calls" and use write() where possible may add up.
Rob Tillaart

Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -
(Please do not PM for private consultancy)

robtillaart

#103
Jul 21, 2013, 04:30 pm Last Edit: Jul 25, 2013, 12:34 pm by robtillaart Reason: 1
update on printfloat version using divmod10() . Code see- http://forum.arduino.cc/index.php?topic=167414.msg1312959#msg1312959 -

Incorporated the Stimmer ASM divmod10_asm into the floating point test. - http://forum.arduino.cc/index.php?topic=167414.msg1293679#msg1293679 -
It strips of another 3% for printing floats

output:
testing
10737.4179
1.0182
107.37
Time=1008  << original 2144 is 53% off
done

1 millisecond for 19 digits is about 50+ uSec per digit (iso 100)

update: printFloat continues in its own thread here - http://forum.arduino.cc/index.php?topic=179111.0 -
Rob Tillaart

Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -
(Please do not PM for private consultancy)

Paul Stoffregen

I published a Teensyduino release candidate today, which includes Stimmer's optimization.

http://forum.pjrc.com/threads/24393-Teensyduino-1-17-Release-Candidate-1-Available

Thanks to everyone who worked and contributed to this awesome speedup.  Soon it'll be in widespread use on Teensy 2.0 and Teensy++ 2.0 boards.  :)

Go Up