-
-
Notifications
You must be signed in to change notification settings - Fork 897
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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>
- Loading branch information
1 parent
8f1b44d
commit 8220dc7
Showing
4 changed files
with
276 additions
and
105 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.