-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unroll sscanf into strncmp and strtol #83
base: master
Are you sure you want to change the base?
Conversation
If you have only |
Let me investigate |
Fixed the corner case of PTS and DTS = LLONG_MIN |
I might as well try to abstract and pull the lwi file IO part out of the lwindex.c. |
Tested with ~1h video+audio. The parsing time is improved from ~2.66s to ~1.61s. |
On my computer (Ryzen 7940H)
On ARM64 VPS (Neoverse-N1)
Test & benchmark code https://gist.github.com/msg7086/f0cf87f73b4e4affa5e02a4f7c2973f4 |
Most of the time in parse_index was spent in
sscanf
. I unrolled it intostrncmp
andstrtol
to improve performance.(5s -> 1.3s for a 330MB lwi file.)