summaryrefslogtreecommitdiffstatshomepage
path: root/examples/usercmodule/cppexample/example.cpp
diff options
context:
space:
mode:
authorArtyom Skrobov <tyomitch@gmail.com>2021-05-03 14:17:36 -0400
committerDamien George <damien@micropython.org>2022-02-11 22:52:32 +1100
commit18b1ba086c0e5547ca81030bf13b026961f80720 (patch)
tree2eda1e61c4c61053b6ddd2f1c53e434854dadbd0 /examples/usercmodule/cppexample/example.cpp
parente8bc4a3a5be12ad639b811852337c63e8f1d6277 (diff)
downloadmicropython-18b1ba086c0e5547ca81030bf13b026961f80720.tar.gz
micropython-18b1ba086c0e5547ca81030bf13b026961f80720.zip
py/qstr: Separate hash and len from string data.
This allows the compiler to merge strings: e.g. "update", "difference_update" and "symmetric_difference_update" will all point to the same memory. No functional change. The size reduction depends on the number of qstrs in the build. The change this commit brings is: bare-arm: -4 -0.007% minimal x86: +150 +0.092% [incl +48(data)] unix x64: -608 -0.118% unix nanbox: -572 -0.126% [incl +32(data)] stm32: -1392 -0.352% PYBV10 cc3200: -448 -0.244% esp8266: -1208 -0.173% GENERIC esp32: -1028 -0.068% GENERIC[incl -1020(data)] nrf: -440 -0.252% pca10040 rp2: -1072 -0.217% PICO samd: -368 -0.264% ADAFRUIT_ITSYBITSY_M4_EXPRESS Performance is also improved (on bare metal at least) for the core_import_mpy_multi.py, core_import_mpy_single.py and core_qstr.py performance benchmarks. Originally at adafruit#4583 Signed-off-by: Artyom Skrobov <tyomitch@gmail.com>
Diffstat (limited to 'examples/usercmodule/cppexample/example.cpp')
0 files changed, 0 insertions, 0 deletions