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 fmt runtime benchmark #1653

Merged
merged 1 commit into from
Jul 14, 2023
Merged

Add fmt runtime benchmark #1653

merged 1 commit into from
Jul 14, 2023

Conversation

Kobzol
Copy link
Contributor

@Kobzol Kobzol commented Jul 13, 2023

It would be really nice to have a benchmark that tests the performance of std::fmt. I haven't found any reasonable real-world benchmarks that I could extract yet (maybe something from rustdoc? but these codes tend to have a lot of dependencies), so I just included this very small "smoke test" for now. I expect that we will modify/replace it later, but at least we have something for now.

Finished fmt/fmt-debug-derive (1/2)
    [Instructions]: min:   4,903,829,976    mean:    4,903,829,980    stddev:           5
          [Cycles]: min:   1,314,690,611    mean:    1,328,393,111    stddev:  20,201,916
  [Wall time [µs]]: min:         322,033    mean:          324,207    stddev:       2,697
   [Branch misses]: min:       3,105,554    mean:        3,136,476    stddev:      16,651
    [Cache misses]: min:         488,771    mean:          605,165    stddev:      67,914

Finished fmt/fmt-write-str (2/2)
    [Instructions]: min:   3,408,031,576    mean:    3,408,031,578    stddev:           1
          [Cycles]: min:     858,696,891    mean:      863,965,390    stddev:   8,381,552
  [Wall time [µs]]: min:         233,006    mean:          235,397    stddev:       4,027
   [Branch misses]: min:          51,930    mean:           53,910    stddev:       2,234
    [Cache misses]: min:          28,441    mean:           29,505    stddev:       1,483

@Kobzol Kobzol requested a review from nnethercote July 13, 2023 15:28
@Kobzol Kobzol enabled auto-merge July 14, 2023 12:50
@Kobzol Kobzol merged commit 825994d into rust-lang:master Jul 14, 2023
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.

2 participants