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

Implement HTML 5 serialization in C #2596

Merged
merged 1 commit into from
Jul 19, 2022
Merged

Implement HTML 5 serialization in C #2596

merged 1 commit into from
Jul 19, 2022

Commits on Jul 19, 2022

  1. perf: implement HTML5 serialization in C

    HTML 5 serialization was previously done entirely in Ruby.
    The Ruby code is slow. This reimplements the serialization in C.
    
    Reencoding happens after UTF-8 serialization.
    
    This is about 10x faster:
    
    ```
    C - ruby 3.2.0dev (2022-07-18T21:06:30Z master 85ea46730d) [x86_64-linux]:
          848.4 i/s
    C - ruby 3.1.2p20 (2022-04-12 revision 4491bb740a) [x86_64-linux]:
          812.0 i/s - same-ish: difference falls within error
    ruby - ruby 3.1.2p20 (2022-04-12 revision 4491bb740a) +YJIT [x86_64-linux]:
           86.3 i/s - 9.83x  (± 0.00) slower
    ruby - ruby 3.2.0dev (2022-07-18T21:06:30Z master 85ea46730d) +YJIT [x86_64-linux]:
           82.9 i/s - 10.24x  (± 0.00) slower
    ruby - ruby 3.1.2p20 (2022-04-12 revision 4491bb740a) [x86_64-linux]:
           80.4 i/s - 10.55x  (± 0.00) slower
    ruby - ruby 3.2.0dev (2022-07-18T21:06:30Z master 85ea46730d) [x86_64-linux]:
           74.7 i/s - 11.36x  (± 0.00) slower
    ```
    
    Fixes: #2569
    
    Co-authored-by: Mike Dalessio <mike.dalessio@gmail.com>
    stevecheckoway and flavorjones committed Jul 19, 2022
    Configuration menu
    Copy the full SHA
    8a32539 View commit details
    Browse the repository at this point in the history