Skip to content
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

lregex: optimize substitute() #3728

Merged

Commits on May 18, 2023

  1. lregex: optimize substitute()

    substitute was one of the bottle neck.
    It called strlen before memcpy.
    We can remove the strlen invocation safely.
    
    The original code:
      $ xargs cat <  /tmp/list > /dev/null; time ./ctags -L - < /tmp/list
      ./ctags -L - < /tmp/list  97.39s user 4.72s system 97% cpu 1:45.09 total
    
    With this change:
      $ xargs cat <  /tmp/list > /dev/null; time ./ctags -L - < /tmp/list
      ./ctags -L - < /tmp/list  87.24s user 4.68s system 97% cpu 1:34.28 total
    
    About 10% faster!
    
    Signed-off-by: Masatake YAMATO <yamato@redhat.com>
    masatake committed May 18, 2023
    Configuration menu
    Copy the full SHA
    a04ac8f View commit details
    Browse the repository at this point in the history