diff options
author | Alexey Dobriyan <[email protected]> | 2023-10-27 17:13:58 +0300 |
---|---|---|
committer | Petr Mladek <[email protected]> | 2023-11-01 15:55:39 +0100 |
commit | 72fcce70faf06dd7442bf0b41b71f071d7fa29a4 (patch) | |
tree | 9fd2191e260b19a7682517db62b6ab33595d8cd5 /lib/test_fortify/write_overflow-strncpy-src.c | |
parent | 3f6074cf467f6c2beb7db0b0d685fb53f25ae9aa (diff) |
vsprintf: uninline simple_strntoull(), reorder arguments
* uninline simple_strntoull(),
gcc overinlines and this function is not performance critical
* reorder arguments, so that appending INT_MAX as 4th argument
generates very efficient tail call
Space savings:
add/remove: 1/0 grow/shrink: 0/3 up/down: 27/-179 (-152)
Function old new delta
simple_strntoll - 27 +27
simple_strtoull 15 10 -5
simple_strtoll 41 7 -34
vsscanf 1930 1790 -140
Signed-off-by: Alexey Dobriyan <[email protected]>
Reviewed-by: Andy Shevchenko <[email protected]>
Reviewed-by: Petr Mladek <[email protected]>
Signed-off-by: Petr Mladek <[email protected]>
Link: https://lore.kernel.org/all/82a2af6e-9b6c-4a09-89d7-ca90cc1cdad1@p183/
Diffstat (limited to 'lib/test_fortify/write_overflow-strncpy-src.c')
0 files changed, 0 insertions, 0 deletions