Reduce .text size in config.o #486

Manually merged
dnkl merged 0 commits from config-code-size into master 7 months ago
dnkl commented 7 months ago
Owner
  • Implement LOG_AND_NOTIFY_* macros in terms of no-inline functions
  • Don't inline str_to_*() functions
  • Avoid tll_push_back() code expansion when generating default key+mouse bindings.

Reduces code size by quite a lot (size -A config.c.o):

From:

section               size   addr
.text                37857      0
...
Total                45169

To:

section               size   addr
.text                26961      0
...
Total                34424

Size of foot

Type Before After Reduction
LTO 504K 484K 20K
PGO 356K 340K 16K
-O3 444K 436K 8K
* Implement `LOG_AND_NOTIFY_*` macros in terms of no-inline functions * Don't inline `str_to_*()` functions * Avoid `tll_push_back()` code expansion when generating default key+mouse bindings. Reduces code size by quite a lot (`size -A config.c.o`): From: ``` section size addr .text 37857 0 ... Total 45169 ``` To: ``` section size addr .text 26961 0 ... Total 34424 ``` Size of `foot` | Type | Before | After | Reduction | |-------|-------:|------:|----------:| | LTO | 504K | 484K | 20K | | PGO | 356K | 340K | 16K | | `-O3` | 444K | 436K | 8K |
dnkl added the
performance
label 7 months ago
dnkl force-pushed config-code-size from 847c4baecb to 0b97740bd0 7 months ago
dnkl added 2 commits 7 months ago
ba2c3606bf
config: avoid tll() code expansion when generating default bindings
dnkl merged commit df6c6f5bd6 into master manually 7 months ago
The pull request has been manually merged as df6c6f5bd6.
Sign in to join this conversation.
Loading…
There is no content yet.