Skip to content

Improve perfomance by replacing sscanf with strto* functions#1074

Open
earnol wants to merge 1 commit intoleethomason:masterfrom
earnol:master
Open

Improve perfomance by replacing sscanf with strto* functions#1074
earnol wants to merge 1 commit intoleethomason:masterfrom
earnol:master

Conversation

@earnol
Copy link
Copy Markdown

@earnol earnol commented May 7, 2026

*scanf functions are less efficient compared to specialized strto* functions. The replacement allowed to use shorter code and achieve ~42% parsing performance boost from 2534ms to 1478ms on dream.xml example on average with -O2.
This patch also addresses findings from bugprone-misplaced-widening-cast checker when run on library code.

*scanf functions are less efficient compared to
specialized strto*. The replacement allowed to use
shorter code and achive ~42% parsing performance boost
from 2534ms to 1478ms on dream.xml example on average.
This patch also addresses findings from
bugprone-misplaced-widening-cast checker when run on library code.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant