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

Small perf improvement for fmt #57537

Merged
merged 3 commits into from
Jan 22, 2019
Merged

Small perf improvement for fmt #57537

merged 3 commits into from
Jan 22, 2019

Commits on Jan 11, 2019

  1. Add fmt benchmarks

    sinkuu committed Jan 11, 2019
    Configuration menu
    Copy the full SHA
    0f34e0d View commit details
    Browse the repository at this point in the history

Commits on Jan 12, 2019

  1. Utilize specialized zip iterator impl

     name                        old ns/iter  new ns/iter  diff ns/iter   diff %  speedup
     fmt::write_str_macro1       13,927       12,489             -1,438  -10.33%   x 1.12
     fmt::write_str_macro2       24,633       23,418             -1,215   -4.93%   x 1.05
     fmt::write_str_macro_debug  234,633      233,092            -1,541   -0.66%   x 1.01
     fmt::write_str_ref          5,819        5,823                   4    0.07%   x 1.00
     fmt::write_str_value        6,012        5,828                -184   -3.06%   x 1.03
     fmt::write_vec_macro1       18,550       17,143             -1,407   -7.58%   x 1.08
     fmt::write_vec_macro2       30,369       28,920             -1,449   -4.77%   x 1.05
     fmt::write_vec_macro_debug  244,338      244,901               563    0.23%   x 1.00
     fmt::write_vec_ref          5,952        5,885                 -67   -1.13%   x 1.01
     fmt::write_vec_value        5,944        5,894                 -50   -0.84%   x 1.01
    sinkuu committed Jan 12, 2019
    Configuration menu
    Copy the full SHA
    d7a7ce9 View commit details
    Browse the repository at this point in the history
  2. Fix simple formatting optimization

    name                        old2 ns/iter  new2 ns/iter  diff ns/iter   diff %  speedup
    fmt::write_str_macro1       12,295        12,308                  13    0.11%   x 1.00
    fmt::write_str_macro2       24,079        21,451              -2,628  -10.91%   x 1.12
    fmt::write_str_macro_debug  238,363       230,807             -7,556   -3.17%   x 1.03
    fmt::write_str_ref          6,203         6,064                 -139   -2.24%   x 1.02
    fmt::write_str_value        6,225         6,075                 -150   -2.41%   x 1.02
    fmt::write_vec_macro1       17,144        17,121                 -23   -0.13%   x 1.00
    fmt::write_vec_macro2       29,845        26,703              -3,142  -10.53%   x 1.12
    fmt::write_vec_macro_debug  248,840       242,117             -6,723   -2.70%   x 1.03
    fmt::write_vec_ref          5,954         6,438                  484    8.13%   x 0.92
    fmt::write_vec_value        5,959         6,439                  480    8.06%   x 0.93
    sinkuu committed Jan 12, 2019
    Configuration menu
    Copy the full SHA
    038d837 View commit details
    Browse the repository at this point in the history