Skip to content
Snippets Groups Projects
  • Stepan Koltsov's avatar
    3f5890be
    Optimize Bytes::slice(n, n) (#123) · 3f5890be
    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
    ```
    3f5890be
    History
    Optimize Bytes::slice(n, n) (#123)
    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
    ```