Skip to content

Commit ec67b23

Browse files
committed
doc: Document a couple more limitations in array and natmod
1 parent d94fe33 commit ec67b23

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

doc/micropython-tinyml-status.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ How ready is MicroPython for use in a TinyML setting.
55

66
Completely broken on at least one port, due to being garbage collected.
77

8+
Using floating point / math operations is difficult / very tedious.
9+
Need to manually resolve all symbols.
10+
https://github.com/micropython/micropython/issues/5629
811

912
## Efficient data processing
1013

@@ -21,13 +24,19 @@ Native machine code emitters with @micropython.native/viper
2124
Good! Integer only code can be made quite fast with
2225
Limitation. Floating point code cannot be optimized with @micropython.native
2326

24-
Inefficient conersion from bytes to array.array?
27+
Inefficient conversion from bytes to array.array?
28+
! Missing a "cast" type operation.
2529
When data comes an IMU/accelerometer over I2C/SPI it is just bytes.
2630
However these actually represent integer values, typically int16,
2731
stored in either little or big endian formats.
2832
TODO: benchmark the various options here.
2933
Plain buffer/array accesses vs struct.unpack / unpack_into
3034

35+
!Inefficient creation of array.array
36+
Must use a generator-based constructor - the only type that is standardized.
37+
This can take seconds for many items.
38+
Would want to initialize , or initialized filled with a particular value.
39+
3140
Semi-related. Encoding base64 cannot be done without allocations. LINK issue
3241
Useful for serializing binary data for sending in textual protocols.
3342
Be it USART, JSON based web API, etc.

0 commit comments

Comments
 (0)