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

perf: use default memory management within libxml2 #2734

Closed
wants to merge 1 commit into from

Commits on Dec 20, 2022

  1. perf: use default memory management within libxml2

    instead of ruby's memory management functions, which has been the case
    since 2009.
    
    HTML4 parsing is 14-19% faster:
    
        alloc html4 parse 656:    22371.3 i/s
        BASE_ html4 parse 656:    19589.4 i/s - 1.14x  (± 0.03) slower
    
        alloc html4 parse 70095:      461.4 i/s
        BASE_ html4 parse 70095:      385.5 i/s - 1.19x  (± 0.11) slower
    
        alloc html4 parse 1929522:       43.7 i/s
        BASE_ html4 parse 1929522:       37.2 i/s - 1.18x  (± 0.05) slower
    
    HTML5 parsing is 5-8% faster:
    
        alloc html5 parse 656:    17909.1 i/s
        BASE_ html5 parse 656:    16597.7 i/s - 1.08x  (± 0.04) slower
    
        alloc html5 parse 70095:      277.3 i/s
        BASE_ html5 parse 70095:      263.4 i/s - same-ish: difference falls within error
    
        alloc html5 parse 1929522:       16.6 i/s
        BASE_ html5 parse 1929522:       15.8 i/s - 1.05x  (± 0.03) slower
    
    HTML4 serialization is 10-14% faster:
    
        alloc html4 srlze 656:    69707.3 i/s
        BASE_ html4 srlze 656:    63537.4 i/s - 1.10x  (± 0.02) slower
    
        alloc html4 srlze 70095:     1504.5 i/s
        BASE_ html4 srlze 70095:     1331.9 i/s - 1.13x  (± 0.02) slower
    
        alloc html4 srlze 1929522:      145.5 i/s
        BASE_ html4 srlze 1929522:      128.0 i/s - 1.14x  (± 0.02) slower
    
    HTML5 serialization is not very impacted, as expected.
    
        alloc html5 srlze 656:    42255.7 i/s
        BASE_ html5 srlze 656:    41118.8 i/s - 1.03x  (± 0.02) slower
    
        alloc html5 srlze 70095:     1050.6 i/s
        BASE_ html5 srlze 70095:     1033.8 i/s - same-ish: difference falls within error
    
        alloc html5 srlze 1929522:      121.5 i/s
        BASE_ html5 srlze 1929522:      118.3 i/s - 1.03x  (± 0.02) slower
    flavorjones committed Dec 20, 2022
    Configuration menu
    Copy the full SHA
    a6154d9 View commit details
    Browse the repository at this point in the history