@Paul: re p#36 / p#43 using the updated github cores in the sketch here at 24 MHz:
Short Summary: You did good with the ASM and rework - micros() is running 3 cycles faster by this measure. And net effect looks like a reduction of 24% of sequential calls to micros() returning 2 us or more later, and 37% more returning in 1 us.
And no indication of resulting side effects.
The data for that using github updated with 'frac':
Code:
15529 at 1us // 37% more here
17186 at 2us
9 at 3us
40 at 4us
2 at 5us
1 at 16us
Test cycles per iteration 36 Test Cnt over 1us 17238 of 32767 // 24% fewer here
And testing with 1.49 b3 code:
Code:
11334 at 1us
21377 at 2us
1 at 3us
40 at 4us
14 at 5us
1 at 16us
Test cycles per iteration 39 Test Cnt over 1us 21433 of 32767
Same results at 36 MHz are more dramatically better with FRAC:
Code:
32198 at 1us
535 at 2us
34 at 3us
Test cycles per iteration 36 Test Cnt over 1us 569 of 32767
td1.49b3 at 36 MHz:
Code:
3 at 0us
29653 at 1us
3081 at 2us
30 at 3us
Test cycles per iteration 39 Test Cnt over 1us 3111 of 32767