Commit Graph

8 Commits

Author SHA1 Message Date
Jeff Epler 4d8b354c13
Use qstrs to improve compression
any qstr of >= 3 chars long is a candidate for use; the input byte value
(1) is used to indicate a fixed-length qstr number follows.

Before accounting for the code size changes, this saves ~100 bytes
on trinket m0, but it may end up being a wash due to added code.

A cutoff of length>2 is slightly better for ja and ru and worse for others.
This has to do with the relative frequency of latin characters vs non-latin
characters, is my guess.

lang    after   before  change (- = more free space)
en_US   3132    2996    -134
fr      2136    2060    -76
ja      1916    1724    -232
ru      2196    2000    -196
2023-08-23 15:16:53 -05:00
MicroDev d9d94eacca
run updated pre-commit 2023-02-01 13:38:41 +05:30
Jeff Epler fb66a6bfe5
Don't use "offset" as an identifier 2022-11-30 14:39:54 -06:00
Jeff Epler e5b83821f8
fr should fit in 8 bits 2022-11-30 14:39:53 -06:00
Jeff Epler d16c9515b7
Compact the characters of certain translations, so they fit in uint8_t
This saves a few hundred bytes on the affected translations, such
as `el` which shrunk from 186152 to 185588 bytes (564 bytes saved).
2022-11-30 14:39:53 -06:00
Jeff Epler 9c11bb2ed9
Check that translations fit in expected character type 2022-11-30 14:39:50 -06:00
Scott Shawcroft be67067809
Merge remote-tracking branch 'adafruit/main' into translate_header 2022-06-03 15:18:18 -07:00
Scott Shawcroft fd5ef009a4
Move compressed strings into own object file
This breaks the translation dependency to all of the other objects
and therefore speeds up subsequent builds. Now, even when the big
translate() function is inlined in the header, it only needs to be
optimized once.
2022-06-02 11:48:56 -07:00