Commit 8262532
committed
docs: Document @micropython.native usage policy.
Closes #405.
Add a guideline to CONTRIBUTING.md: @micropython.native must not be used
in driver code (I2C/SPI bus time dominates, native compilation gains
nothing) but may be used in examples on rendering hot-paths where a
measurable speedup is expected.
Remove the unnecessary @micropython.native from compute_display() in
radar_screen.py — the function does 3 comparisons with no loop, so
native compilation provides no benefit. Also remove the now-unused
`import micropython`.1 parent a3ddb36 commit 8262532
2 files changed
Lines changed: 1 addition & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
| 38 | + | |
38 | 39 | | |
39 | 40 | | |
40 | 41 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
11 | 10 | | |
12 | 11 | | |
13 | 12 | | |
| |||
29 | 28 | | |
30 | 29 | | |
31 | 30 | | |
32 | | - | |
33 | 31 | | |
34 | 32 | | |
35 | 33 | | |
| |||
0 commit comments