Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get rid of EncodeListItem instantiations for integers of less than 8 bytes. #37094

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

bzbarsky-apple
Copy link
Contributor

We can just treat all integer types as either int64_t or uint64_t depending on whether the type is signed, and TLV encoding will not change.

Testing

Should not cause any behavior changes. Just smaller code.

…bytes.

We can just treat all integer types as either int64_t or uint64_t depending on
whether the type is signed, and TLV encoding will not change.
Copy link

Review changes with  SemanticDiff

@github-actions github-actions bot added the app label Jan 17, 2025
Copy link

github-actions bot commented Jan 17, 2025

PR #37094: Size comparison from 9b8fffe to 91dfa67

Full report (71 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, cyw30739, efr32, esp32, linux, nrfconnect, nxp, psoc6, qpg, stm32, telink, tizen)
platform target config section 9b8fffe 91dfa67 change % change
bl602 lighting-app bl602+mfd+littlefs+rpc FLASH 1093164 1093164 0 0.0
RAM 103354 103346 -8 -0.0
bl702 lighting-app bl702+eth FLASH 651226 651482 256 0.0
RAM 25361 25361 0 0.0
bl702+wifi FLASH 829150 829150 0 0.0
RAM 14101 14101 0 0.0
bl706+mfd+rpc+littlefs FLASH 1056180 1056436 256 0.0
RAM 23957 23957 0 0.0
bl702l contact-sensor-app bl702l+mfd+littlefs FLASH 889204 889204 0 0.0
RAM 18632 18624 -8 -0.0
lighting-app bl702l+mfd+littlefs FLASH 972164 972420 256 0.0
RAM 16480 16480 0 0.0
cc13x4_26x4 lighting-app LP_EM_CC1354P10_6 FLASH 838436 838548 112 0.0
RAM 123536 123536 0 0.0
lock-ftd LP_EM_CC1354P10_6 FLASH 823784 823904 120 0.0
RAM 125416 125416 0 0.0
pump-app LP_EM_CC1354P10_6 FLASH 771104 771224 120 0.0
RAM 113900 113900 0 0.0
pump-controller-app LP_EM_CC1354P10_6 FLASH 755300 755412 112 0.0
RAM 114100 114100 0 0.0
cc32xx air-purifier CC3235SF_LAUNCHXL FLASH 538781 538973 192 0.0
RAM 205288 205288 0 0.0
lock CC3235SF_LAUNCHXL FLASH 572629 572821 192 0.0
RAM 205424 205424 0 0.0
cyw30739 light CYW30739B2-P5-EVK-01 unknown 2040 2040 0 0.0
FLASH 679881 680009 128 0.0
RAM 78596 78596 0 0.0
CYW30739B2-P5-EVK-02 unknown 2040 2040 0 0.0
FLASH 699733 699853 120 0.0
RAM 81236 81236 0 0.0
CYW30739B2-P5-EVK-03 unknown 2040 2040 0 0.0
FLASH 699733 699853 120 0.0
RAM 81236 81236 0 0.0
CYW930739M2EVB-02 unknown 2040 2040 0 0.0
FLASH 656669 656797 128 0.0
RAM 73664 73664 0 0.0
light-switch CYW30739B2-P5-EVK-01 unknown 2040 2040 0 0.0
FLASH 616289 616401 112 0.0
RAM 71588 71588 0 0.0
CYW30739B2-P5-EVK-02 unknown 2040 2040 0 0.0
FLASH 635925 636037 112 0.0
RAM 74132 74132 0 0.0
CYW30739B2-P5-EVK-03 unknown 2040 2040 0 0.0
FLASH 635925 636037 112 0.0
RAM 74132 74132 0 0.0
lock CYW30739B2-P5-EVK-01 unknown 2040 2040 0 0.0
FLASH 635753 635881 128 0.0
RAM 74588 74588 0 0.0
CYW30739B2-P5-EVK-02 unknown 2040 2040 0 0.0
FLASH 655469 655597 128 0.0
RAM 77132 77132 0 0.0
CYW30739B2-P5-EVK-03 unknown 2040 2040 0 0.0
FLASH 655469 655597 128 0.0
RAM 77132 77132 0 0.0
thermostat CYW30739B2-P5-EVK-01 unknown 2040 2040 0 0.0
FLASH 612301 612421 120 0.0
RAM 68684 68684 0 0.0
CYW30739B2-P5-EVK-02 unknown 2040 2040 0 0.0
FLASH 632161 632281 120 0.0
RAM 71316 71316 0 0.0
CYW30739B2-P5-EVK-03 unknown 2040 2040 0 0.0
FLASH 632161 632281 120 0.0
RAM 71316 71316 0 0.0
efr32 lock-app BRD4187C FLASH 935112 935272 160 0.0
RAM 160004 160004 0 0.0
BRD4338a FLASH 730804 730684 -120 -0.0
RAM 234844 234844 0 0.0
window-app BRD4187C FLASH 1030456 1030360 -96 -0.0
RAM 128112 128112 0 0.0
esp32 all-clusters-app c3devkit DRAM 95192 95192 0 0.0
FLASH 1538592 1538796 204 0.0
IRAM 82552 82552 0 0.0
m5stack DRAM 116172 116172 0 0.0
FLASH 1545810 1546006 196 0.0
IRAM 117039 117039 0 0.0
linux air-purifier-app debug unknown 4752 4752 0 0.0
FLASH 2710271 2709941 -330 -0.0
RAM 133096 133096 0 0.0
all-clusters-app debug unknown 5560 5560 0 0.0
FLASH 5976336 5976004 -332 -0.0
RAM 531880 531880 0 0.0
all-clusters-minimal-app debug unknown 5456 5456 0 0.0
FLASH 5324354 5324024 -330 -0.0
RAM 242992 242992 0 0.0
bridge-app debug unknown 5472 5472 0 0.0
FLASH 4682582 4682250 -332 -0.0
RAM 221744 221744 0 0.0
chip-tool debug unknown 5984 5984 0 0.0
FLASH 13045234 13045342 108 0.0
RAM 596634 596634 0 0.0
chip-tool-ipv6only arm64 unknown 21816 21816 0 0.0
FLASH 11125744 11125808 64 0.0
RAM 648168 648168 0 0.0
fabric-admin debug unknown 5808 5808 0 0.0
FLASH 11392209 11392317 108 0.0
RAM 596978 596978 0 0.0
fabric-bridge-app debug unknown 4728 4728 0 0.0
FLASH 4507632 4507300 -332 -0.0
RAM 208880 208880 0 0.0
fabric-sync debug unknown 4968 4968 0 0.0
FLASH 5610437 5610101 -336 -0.0
RAM 483656 483656 0 0.0
lighting-app debug+rpc+ui unknown 6136 6136 0 0.0
FLASH 5617905 5617585 -320 -0.0
RAM 232008 232008 0 0.0
lock-app debug unknown 5408 5408 0 0.0
FLASH 4731538 4731208 -330 -0.0
RAM 207976 207976 0 0.0
ota-provider-app debug unknown 4768 4768 0 0.0
FLASH 4361240 4360910 -330 -0.0
RAM 201696 201696 0 0.0
ota-requestor-app debug unknown 4720 4720 0 0.0
FLASH 4498914 4498584 -330 -0.0
RAM 206280 206280 0 0.0
shell debug unknown 4248 4248 0 0.0
FLASH 3006717 3006397 -320 -0.0
RAM 160736 160736 0 0.0
thermostat-no-ble arm64 unknown 9568 9568 0 0.0
FLASH 4102184 4101864 -320 -0.0
RAM 246224 246224 0 0.0
tv-app debug unknown 5736 5736 0 0.0
FLASH 5950597 5950261 -336 -0.0
RAM 607088 607088 0 0.0
tv-casting-app debug unknown 5312 5312 0 0.0
FLASH 11273069 11272733 -336 -0.0
RAM 711064 711064 0 0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 FLASH 914768 914908 140 0.0
RAM 143172 143172 0 0.0
nrf7002dk_nrf5340_cpuapp FLASH 890116 890044 -72 -0.0
RAM 141359 141359 0 0.0
all-clusters-minimal-app nrf52840dk_nrf52840 FLASH 849488 849628 140 0.0
RAM 142084 142084 0 0.0
nxp contact k32w0+release FLASH 584504 584616 112 0.0
RAM 70952 70952 0 0.0
mcxw71+release FLASH 600024 600152 128 0.0
RAM 63168 63168 0 0.0
light k32w0+release FLASH 611188 611316 128 0.0
RAM 70344 70344 0 0.0
k32w1+release FLASH 685736 685856 120 0.0
RAM 48760 48760 0 0.0
lock mcxw71+release FLASH 761800 761928 128 0.0
RAM 70796 70796 0 0.0
psoc6 all-clusters cy8ckit_062s2_43012 FLASH 1648060 1647964 -96 -0.0
RAM 211624 211624 0 0.0
all-clusters-minimal cy8ckit_062s2_43012 FLASH 1554628 1554500 -128 -0.0
RAM 208440 208440 0 0.0
light cy8ckit_062s2_43012 FLASH 1470172 1470060 -112 -0.0
RAM 200408 200408 0 0.0
lock cy8ckit_062s2_43012 FLASH 1467884 1467788 -96 -0.0
RAM 224760 224760 0 0.0
qpg lighting-app qpg6105+debug FLASH 662552 662664 112 0.0
RAM 105296 105296 0 0.0
lock-app qpg6105+debug FLASH 620268 620396 128 0.0
RAM 99748 99748 0 0.0
stm32 light STM32WB5MM-DK FLASH 483240 483360 120 0.0
RAM 144752 144752 0 0.0
telink bridge-app tlsr9258a FLASH 682276 682380 104 0.0
RAM 91088 91088 0 0.0
contact-sensor-app tlsr9528a_retention FLASH 622566 622670 104 0.0
RAM 31488 31488 0 0.0
light-app-ota-compress-lzma-shell-factory-data tl3218x FLASH 771344 771448 104 0.0
RAM 49348 49348 0 0.0
light-app-ota-shell-factory-data tl7218x FLASH 775948 776052 104 0.0
RAM 99652 99652 0 0.0
light-switch-app-ota-compress-lzma-shell-factory-data tlsr9528a FLASH 709794 709898 104 0.0
RAM 73384 73384 0 0.0
lighting-app-ota-factory-data tlsr9118bdk40d FLASH 626894 627062 168 0.0
RAM 142020 142020 0 0.0
lighting-app-ota-rpc-factory-data-4mb tlsr9518adk80d FLASH 812958 813062 104 0.0
RAM 99564 99564 0 0.0
tizen all-clusters-app arm unknown 5132 5132 0 0.0
FLASH 1755280 1755168 -112 -0.0
RAM 93672 93672 0 0.0
chip-tool-ubsan arm unknown 11044 11044 0 0.0
FLASH 18216638 18216774 136 0.0
RAM 7958464 7958560 96 0.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant