summaryrefslogtreecommitdiffstatshomepage
path: root/drivers/display
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2017-02-17 12:12:40 +1100
committerDamien George <damien.p.george@gmail.com>2017-02-17 12:12:40 +1100
commit534b7c368dc2af7720f3aaed0c936ef46d773957 (patch)
treee1b71ef80c0b883728a8871fe277da33b4889c14 /drivers/display
parent773278ec3030ea9ed809c5a248fde2278ce4b557 (diff)
downloadmicropython-534b7c368dc2af7720f3aaed0c936ef46d773957.tar.gz
micropython-534b7c368dc2af7720f3aaed0c936ef46d773957.zip
py: Do adjacent str/bytes literal concatenation in lexer, not compiler.
It's much more efficient in RAM and code size to do implicit literal string concatenation in the lexer, as opposed to the compiler. RAM usage is reduced because the concatenation can be done right away in the tokeniser by just accumulating the string/bytes literals into the lexer's vstr. Prior to this patch adjacent strings/bytes would create a parse tree (one node per string/bytes) and then in the compiler a whole new chunk of memory was allocated to store the concatenated string, which used more than double the memory compared to just accumulating in the lexer. This patch also significantly reduces code size: bare-arm: -204 minimal: -204 unix x64: -328 stmhal: -208 esp8266: -284 cc3200: -224
Diffstat (limited to 'drivers/display')
0 files changed, 0 insertions, 0 deletions