Skip to content
Snippets Groups Projects
Commit 3f5890be authored by Stepan Koltsov's avatar Stepan Koltsov Committed by Carl Lerche
Browse files

Optimize Bytes::slice(n, n) (#123)

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
```
parent 70ee87ea
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment