You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think the code size increase would not be very large but it would be worth doing to provide better use of the NVS and at the same time having the possibility of a reduction in memory use by having smaller python source files.
It would be nice to use all of the data types that are supported by the NVS and while this won't directly reduce the size it has the potential to reduce the ram use. Python code takes up memory when the files are loaded. The smaller the source file the lower amount of memory is used. currently there are only 2 data types that are supported. int32_t and blob. storing a uint8_t is going to take up 4 bytes of NVS space instead of 1. sure I can use bit shifting at the expense of increase memory use do to a larger python code footprint to do that. The other thing is storing negative and positive numbers together, it just won't work because there is no way to know what is negative and what is positive when separating them.
I also added support for storing floats as well. This is easily done using type punning.
Implementation
I intend to implement this feature and would submit a Pull Request if desirable.
I hope the MicroPython maintainers or community will implement this feature.
I would like to Sponsor development of this feature.
The text was updated successfully, but these errors were encountered:
Checks
I agree to follow the MicroPython Code of Conduct to ensure a safe and respectful space for everyone.
I've searched for existing issues regarding this feature, and didn't find any.
Description
Pseudo code of the expansion.
Code Size
I think the code size increase would not be very large but it would be worth doing to provide better use of the NVS and at the same time having the possibility of a reduction in memory use by having smaller python source files.
It would be nice to use all of the data types that are supported by the NVS and while this won't directly reduce the size it has the potential to reduce the ram use. Python code takes up memory when the files are loaded. The smaller the source file the lower amount of memory is used. currently there are only 2 data types that are supported. int32_t and blob. storing a uint8_t is going to take up 4 bytes of NVS space instead of 1. sure I can use bit shifting at the expense of increase memory use do to a larger python code footprint to do that. The other thing is storing negative and positive numbers together, it just won't work because there is no way to know what is negative and what is positive when separating them.
I also added support for storing floats as well. This is easily done using type punning.
Implementation
The text was updated successfully, but these errors were encountered: