Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Register
  • Sign in
  • L linux
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Issues 0
    • Issues 0
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • Deployments
    • Deployments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • Kirill Smelkov
  • linux
  • Repository
  • linux
  • lib
  • vsprintf.c
Find file BlameHistoryPermalink
  • Alexey Dobriyan's avatar
    vsprintf: uninline simple_strntoull(), reorder arguments · 72fcce70
    Alexey Dobriyan authored Oct 27, 2023
    
    
    * 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: default avatarAlexey Dobriyan <adobriyan@gmail.com>
    Reviewed-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
    Reviewed-by: default avatarPetr Mladek <pmladek@suse.com>
    Signed-off-by: default avatarPetr Mladek <pmladek@suse.com>
    Link: https://lore.kernel.org/all/82a2af6e-9b6c-4a09-89d7-ca90cc1cdad1@p183/
    72fcce70
GitLab Nexedi Edition | About GitLab | About Nexedi | 沪ICP备2021021310号-2 | 沪ICP备2021021310号-7