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

Add simple parser benchmark #1043

Merged
merged 2 commits into from
May 16, 2024
Merged

Add simple parser benchmark #1043

merged 2 commits into from
May 16, 2024

Conversation

Kijewski
Copy link
Collaborator

No description provided.

@Kijewski Kijewski marked this pull request as ready for review May 15, 2024 18:03
@Kijewski
Copy link
Collaborator Author

As a test, I sped-up the parsing of nodes a bit
librustdoc/all          time:   [355.54 µs 356.38 µs 357.32 µs]
                        thrpt:  [39.520 MiB/s 39.623 MiB/s 39.718 MiB/s]
                 change:
                        time:   [-18.234% -16.825% -15.541%] (p = 0.00 < 0.05)
                        thrpt:  [+18.401% +20.229% +22.301%]
                        Performance has improved.

librustdoc/item_info    time:   [5.0121 µs 5.0287 µs 5.0523 µs]
                        thrpt:  [31.145 MiB/s 31.292 MiB/s 31.395 MiB/s]
                 change:
                        time:   [-23.798% -22.817% -21.894%] (p = 0.00 < 0.05)
                        thrpt:  [+28.031% +29.562% +31.230%]
                        Performance has improved.

librustdoc/item_union   time:   [29.414 µs 29.473 µs 29.544 µs]
                        thrpt:  [33.410 MiB/s 33.490 MiB/s 33.557 MiB/s]
                 change:
                        time:   [-16.596% -14.874% -13.411%] (p = 0.00 < 0.05)
                        thrpt:  [+15.489% +17.473% +19.898%]
                        Performance has improved.

librustdoc/page         time:   [155.88 µs 156.54 µs 157.19 µs]
                        thrpt:  [39.392 MiB/s 39.557 MiB/s 39.723 MiB/s]
                 change:
                        time:   [-12.364% -11.542% -10.749%] (p = 0.00 < 0.05)
                        thrpt:  [+12.044% +13.048% +14.108%]
                        Performance has improved.

librustdoc/print_item   time:   [20.818 µs 20.840 µs 20.866 µs]
                        thrpt:  [45.247 MiB/s 45.304 MiB/s 45.351 MiB/s]
                 change:
                        time:   [-12.666% -11.880% -10.936%] (p = 0.00 < 0.05)
                        thrpt:  [+12.278% +13.482% +14.503%]
                        Performance has improved.

librustdoc/short_item_info
                        time:   [18.014 µs 18.028 µs 18.047 µs]
                        thrpt:  [50.202 MiB/s 50.253 MiB/s 50.293 MiB/s]
                 change:
                        time:   [-16.748% -15.854% -14.914%] (p = 0.00 < 0.05)
                        thrpt:  [+17.529% +18.842% +20.118%]
                        Performance has improved.

librustdoc/sidebar      time:   [34.118 µs 34.204 µs 34.316 µs]
                        thrpt:  [35.961 MiB/s 36.079 MiB/s 36.170 MiB/s]
                 change:
                        time:   [-21.998% -21.094% -20.103%] (p = 0.00 < 0.05)
                        thrpt:  [+25.161% +26.732% +28.202%]
                        Performance has improved.

librustdoc/source       time:   [18.575 µs 18.599 µs 18.628 µs]
                        thrpt:  [39.574 MiB/s 39.637 MiB/s 39.688 MiB/s]
                 change:
                        time:   [-13.313% -12.557% -11.734%] (p = 0.00 < 0.05)
                        thrpt:  [+13.294% +14.360% +15.358%]
                        Performance has improved.

librustdoc/type_layout_size
                        time:   [7.6326 µs 7.6403 µs 7.6503 µs]
                        thrpt:  [35.403 MiB/s 35.449 MiB/s 35.485 MiB/s]
                 change:
                        time:   [-28.176% -27.557% -26.758%] (p = 0.00 < 0.05)
                        thrpt:  [+36.533% +38.039% +39.229%]
                        Performance has improved.

librustdoc/type_layout  time:   [50.909 µs 50.962 µs 51.035 µs]
                        thrpt:  [52.752 MiB/s 52.828 MiB/s 52.883 MiB/s]
                 change:
                        time:   [-10.061% -8.7841% -7.6337%] (p = 0.00 < 0.05)
                        thrpt:  [+8.2646% +9.6300% +11.186%]
                        Performance has improved.

Copy link
Collaborator

@djc djc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is great, thanks!

askama_parser/benches/from_str/librustdoc/LICENSE.md Outdated Show resolved Hide resolved
askama_parser/benches/from_str/main.rs Outdated Show resolved Hide resolved
@Kijewski Kijewski merged commit 615fb82 into rinja-rs:main May 16, 2024
17 checks passed
@Kijewski Kijewski deleted the pr-add-benchmark branch May 16, 2024 18:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants