Commit c3b24d0
libraries/Arduino_LED_Matrix: Optimize reverse function.
Use RBIT intrinsic (if available) instead of the slow
software reverse. Note that RBIT is at least ~2x faster:
Reverse Function Benchmark
==========================
Current implementation: 18 ms
Optimized implementation: 8 ms
Speedup: 2.25x
Signed-off-by: iabdalkader <i.abdalkader@gmail.com>1 parent 1239235 commit c3b24d0
1 file changed
+6
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
| 2 | + | |
2 | 3 | | |
3 | 4 | | |
4 | 5 | | |
| |||
14 | 15 | | |
15 | 16 | | |
16 | 17 | | |
17 | | - | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
18 | 22 | | |
19 | 23 | | |
20 | 24 | | |
21 | 25 | | |
22 | 26 | | |
23 | 27 | | |
| 28 | + | |
24 | 29 | | |
25 | 30 | | |
26 | 31 | | |
| |||
0 commit comments