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

Use glibc strlen to speed up xmlStrlen #2144

Merged
merged 1 commit into from
Dec 28, 2020

Commits on Dec 25, 2020

  1. Use glibc strlen to speed up xmlStrlen

    Benchmark results:
    
    xmlStrlen (entire HTML file): 926171.936981 μs
    glibc_xmlStrlen (entire HTML file): 36905.903992 μs
    delta (xmlStrlen ÷ glibc_xmlStrlen): 25.094584 times
    
    xmlStrlen (average string): 57479.204010 μs
    glibc_xmlStrlen (average string): 5802.069000 μs
    delta (xmlStrlen ÷ glibc_xmlStrlen): 9.905937 times
    
    xmlStrlen (bigger string): 388056.315979 μs
    glibc_xmlStrlen (bigger string): 12797.856995 μs
    delta (xmlStrlen ÷ glibc_xmlStrlen): 30.318382 times
    
    xmlStrlen (smallest string): 15870.046021 μs
    glibc_xmlStrlen (smallest string): 6282.208984 μs
    delta (xmlStrlen ÷ glibc_xmlStrlen): 2.527903 times
    
    See https://gitlab.gnome.org/GNOME/libxml2/-/issues/212 for reference.
    ilyazub committed Dec 25, 2020
    Configuration menu
    Copy the full SHA
    7ffd48a View commit details
    Browse the repository at this point in the history