- Oct 23, 2019
-
-
Sean McArthur authored
-
- Oct 16, 2019
-
-
Sean McArthur authored
Bytes is a useful tool for managing multiple slices into the same region of memory, and the other things it used to have been removed to reduce complexity. The exact strategy for managing the multiple references is no longer hard-coded, but instead backing by a customizable vtable. - Removed ability to mutate the underlying memory from the `Bytes` type. - Removed the "inline" (SBO) mechanism in `Bytes`. The reduces a large amount of complexity, and improves performance when accessing the slice of bytes, since a branch is no longer needed to check if the data is inline. - Removed `Bytes` knowledge of `BytesMut` (`BytesMut` may grow that knowledge back at a future point.)
-
- Jul 25, 2019
-
-
Taiki Endo authored
-
- Jun 07, 2019
-
-
Sean McArthur authored
-
Sean McArthur authored
-
- Jul 03, 2018
-
-
Sean McArthur authored
- Clones when the kind is INLINE or STATIC are sped up by over double. - Clones when the kind is ARC are spec up by about 1/3.
-
- Apr 27, 2018
-
-
kohensu authored
-
- Jan 03, 2018
-
-
Stepan Koltsov authored
If `shallow_clone` is called with `&mut self`, and `Bytes` contains `Vec`, then expensive CAS can be avoided, because no other thread have references to this `Bytes` object. Bench `split_off_and_drop` difference: Before the diff: ``` test split_off_and_drop ... bench: 91,858 ns/iter (+/- 17,401) ``` With the diff: ``` test split_off_and_drop ... bench: 81,162 ns/iter (+/- 17,603) ```
-
- Jul 01, 2017
-
-
Stepan Koltsov authored
Slice operation should return inline when possible It is cheaper than atomic increment/decrement. Before this patch: ``` test slice_avg_le_inline_from_arc ... bench: 28,582 ns/iter (+/- 3,880) test slice_empty ... bench: 8,797 ns/iter (+/- 1,325) test slice_large_le_inline_from_arc ... bench: 27,684 ns/iter (+/- 5,920) test slice_short_from_arc ... bench: 27,439 ns/iter (+/- 5,783) ``` After this patch: ``` test slice_avg_le_inline_from_arc ... bench: 18,872 ns/iter (+/- 2,937) test slice_empty ... bench: 9,136 ns/iter (+/- 1,908) test slice_large_le_inline_from_arc ... bench: 18,052 ns/iter (+/- 2,981) test slice_short_from_arc ... bench: 18,200 ns/iter (+/- 2,534) ```
-
- Jun 15, 2017
-
-
Sean McArthur authored
* use slice.to_vec instead of buf.put in From<[u8]> * don't panic in fmt::Write for BytesMut
-
- May 22, 2017
-
-
Stepan Koltsov authored
Return empty `Bytes` object Bench for `slice_empty` difference is ``` 55 ns/iter (+/- 1) # before this patch 17 ns/iter (+/- 5) # with this patch ``` Bench for `slice_not_empty` is ``` 25,058 ns/iter (+/- 1,099) # before this patch 25,072 ns/iter (+/- 1,593) # with this patch ```
-
Carl Lerche authored
-
- Feb 20, 2017
-
-
Carl Lerche authored
The previous implementation didn't factor in a single `Bytes` handle being stored in an `Arc`. This new implementation correctly impelments both `Bytes` and `BytesMut` such that both are `Sync`. The rewrite also increases the number of bytes that can be stored inline.
-