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

Make as_slice() an implementation detail #359

Closed
wants to merge 2 commits into from
Closed

Make as_slice() an implementation detail #359

wants to merge 2 commits into from

Conversation

Kijewski
Copy link
Contributor

@Kijewski Kijewski commented Jan 9, 2024

as_bytes EMPTY          time:   [1.4595 ns 1.4694 ns 1.4797 ns]
                        change: [-27.836% -27.281% -26.629%] (p = 0.00 < 0.05)
                        Performance has improved.
Found 3 outliers among 100 measurements (3.00%)
  2 (2.00%) high mild
  1 (1.00%) high severe

as_bytes SMALL          time:   [1.4472 ns 1.4626 ns 1.4815 ns]
                        change: [-28.946% -28.503% -28.007%] (p = 0.00 < 0.05)
                        Performance has improved.
Found 7 outliers among 100 measurements (7.00%)
  5 (5.00%) high mild
  2 (2.00%) high severe

as_bytes BIG            time:   [1.4627 ns 1.4786 ns 1.4972 ns]
                        change: [-26.822% -26.105% -25.396%] (p = 0.00 < 0.05)
                        Performance has improved.
Found 10 outliers among 100 measurements (10.00%)
  3 (3.00%) high mild
  7 (7.00%) high severe

as_bytes HUGE           time:   [1.4732 ns 1.4876 ns 1.5033 ns]
                        change: [-27.390% -26.700% -25.940%] (p = 0.00 < 0.05)
                        Performance has improved.

compact_str/src/repr/mod.rs Outdated Show resolved Hide resolved
```text
as_bytes EMPTY          time:   [1.4595 ns 1.4694 ns 1.4797 ns]
                        change: [-27.836% -27.281% -26.629%] (p = 0.00 < 0.05)
                        Performance has improved.
Found 3 outliers among 100 measurements (3.00%)
  2 (2.00%) high mild
  1 (1.00%) high severe

as_bytes SMALL          time:   [1.4472 ns 1.4626 ns 1.4815 ns]
                        change: [-28.946% -28.503% -28.007%] (p = 0.00 < 0.05)
                        Performance has improved.
Found 7 outliers among 100 measurements (7.00%)
  5 (5.00%) high mild
  2 (2.00%) high severe

as_bytes BIG            time:   [1.4627 ns 1.4786 ns 1.4972 ns]
                        change: [-26.822% -26.105% -25.396%] (p = 0.00 < 0.05)
                        Performance has improved.
Found 10 outliers among 100 measurements (10.00%)
  3 (3.00%) high mild
  7 (7.00%) high severe

as_bytes HUGE           time:   [1.4732 ns 1.4876 ns 1.5033 ns]
                        change: [-27.390% -26.700% -25.940%] (p = 0.00 < 0.05)
                        Performance has improved.
```
@Kijewski
Copy link
Contributor Author

Kijewski commented Jan 9, 2024

as_mut_ptr() has a 33% regression. But given that the method was implemented wrong before and caused CompactString::drain() to segfault, I guess that's acceptable. :)

@Kijewski Kijewski closed this by deleting the head repository Jan 28, 2024
@NobodyXu
Copy link
Contributor

@Kijewski Did you accidentally close this PR by deleting your fork.

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