Skip to content

cow_utils really improve performance? #7

@heygsc

Description

@heygsc

cow_utils really improve performance?

I ran the official benchmark of cow_utils, I used m1 and m4 separately, tried many times, and the results were similar.

In the replace case, looks like the cow is pretty good, but in the to_lowercase, the cow is lagging behind in all three given situations.

Is my method incorrect? Or is it acceptable because the sample situation is special?

Replace in "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"/replace/("a", "")                                                                            
                        time:   [176.95 ns 177.30 ns 177.64 ns]
Found 6 outliers among 100 measurements (6.00%)
  1 (1.00%) low severe
  2 (2.00%) low mild
  2 (2.00%) high mild
  1 (1.00%) high severe
Replace in "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"/cow_replace/("a", "")                                                                            
                        time:   [129.38 ns 129.77 ns 130.12 ns]
Found 16 outliers among 100 measurements (16.00%)
  7 (7.00%) low severe
  3 (3.00%) low mild
  5 (5.00%) high mild
  1 (1.00%) high severe
Replace in "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"/replace/("b", "c")                                                                             
                        time:   [36.169 ns 36.484 ns 36.877 ns]
Found 9 outliers among 100 measurements (9.00%)
  4 (4.00%) high mild
  5 (5.00%) high severe
Replace in "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"/cow_replace/("b", "c")                                                                             
                        time:   [18.609 ns 18.769 ns 18.970 ns]
Found 3 outliers among 100 measurements (3.00%)
  2 (2.00%) high mild
  1 (1.00%) high severe
Replace in "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"/replace/("a", "b")                                                                            
                        time:   [325.59 ns 328.93 ns 332.02 ns]
Replace in "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"/cow_replace/("a", "b")                                                                            
                        time:   [302.97 ns 306.83 ns 311.13 ns]
Found 3 outliers among 100 measurements (3.00%)
  2 (2.00%) high mild
  1 (1.00%) high severe

To Lowercase/to_lowercase/Ax40                                                                             
                        time:   [19.452 ns 19.561 ns 19.669 ns]
Found 4 outliers among 100 measurements (4.00%)
  3 (3.00%) high mild
  1 (1.00%) high severe
To Lowercase/cow_to_lowercase/Ax40                                                                             
                        time:   [21.313 ns 21.444 ns 21.619 ns]
Found 1 outliers among 100 measurements (1.00%)
  1 (1.00%) high severe
To Lowercase/to_lowercase/ax40                                                                             
                        time:   [19.870 ns 20.003 ns 20.167 ns]
                        change: [+1.6515% +2.4320% +3.2139%] (p = 0.00 < 0.05)
                        Performance has regressed.
Found 2 outliers among 100 measurements (2.00%)
  1 (1.00%) high mild
  1 (1.00%) high severe
To Lowercase/cow_to_lowercase/ax40                                                                            
                        time:   [95.169 ns 95.764 ns 96.785 ns]
                        change: [+342.20% +345.10% +348.79%] (p = 0.00 < 0.05)
                        Performance has regressed.
Found 9 outliers among 100 measurements (9.00%)
  4 (4.00%) high mild
  5 (5.00%) high severe
To Lowercase/to_lowercase/ax20 + Ax20                                                                             
                        time:   [19.704 ns 19.807 ns 19.914 ns]
Found 2 outliers among 100 measurements (2.00%)
  2 (2.00%) high mild
To Lowercase/cow_to_lowercase/ax20 + Ax20                                                                            
                        time:   [70.502 ns 70.723 ns 70.983 ns]
Found 8 outliers among 100 measurements (8.00%)
  3 (3.00%) high mild
  5 (5.00%) high severe

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions