Skip to content
Snippets Groups Projects
  1. Jan 26, 2018
  2. Jun 27, 2017
  3. May 24, 2017
  4. Apr 30, 2017
  5. Mar 19, 2017
    • Carl Lerche's avatar
      Clarify when `BufMut::bytes_mut` can return &[] · bed128b2
      Carl Lerche authored
      Closes #79
      bed128b2
    • Dan Burkert's avatar
      Add inline attributes to Vec's MutBuf methods (#80) · 5a265cc8
      Dan Burkert authored
      I found this significantly improved a
      [benchmark](https://gist.github.com/danburkert/34a7d6680d97bc86dca7f396eb8d0abf)
      which calls `bytes_mut`, writes 1 byte, and advances the pointer with
      `advance_mut` in a pretty tight loop. In particular, it seems to be the
      inline annotation on `bytes_mut` which had the most effect. I also took
      the opportunity to simplify the bounds checking in advance_mut.
      
      before:
      
      ```
      test encode_varint_small  ... bench:         540 ns/iter (+/- 85) = 1481 MB/s
      ```
      
      after:
      
      ```
      test encode_varint_small  ... bench:         422 ns/iter (+/- 24) = 1895 MB/s
      ```
      
      As you can see, the variance is also significantly improved.
      
      Interestingly, I tried to change the last statement in `bytes_mut` from
      
      ```
      &mut slice::from_raw_parts_mut(ptr, cap)[len..]
      ```
      
      to
      
      ```
      slice::from_raw_parts_mut(ptr.offset(len as isize), cap - len)
      ```
      
      but, this caused a very measurable perf regression (almost completely
      negating the gains from marking bytes_mut inline).
      5a265cc8
    • Dan Burkert's avatar
      Clarify BufMut::advance_mut docs (#78) · 4fe4e942
      Dan Burkert authored
      Also fixes an issue with a line wrap in the middle of an inline code
      block.
      4fe4e942
  6. Mar 16, 2017
  7. Mar 07, 2017
    • Carl Lerche's avatar
      Remove buf::Source in favor of buf::IntoBuf · 06b94c55
      Carl Lerche authored
      The `Source` trait was essentially covering the same case as `IntoBuf`,
      so remove it.
      
      While technically a breaking change, this should not have any impact due
      to:
      
      1) There are no reverse dependencies that currently depend on `bytes`
      2) Source was not supposed to be implemented externally
      3) IntoBuf provides the same implementations as `Source`
      
      Given these points, the change should be safe to apply.
      06b94c55
    • Carl Lerche's avatar
      Provide Debug impls for all types · d70f575a
      Carl Lerche authored
      d70f575a
  8. Mar 02, 2017
  9. Mar 01, 2017
  10. Feb 28, 2017
  11. Feb 17, 2017
  12. Feb 16, 2017
  13. Feb 15, 2017
  14. Feb 03, 2017
  15. Nov 22, 2016
  16. Nov 21, 2016
  17. Nov 03, 2016
  18. Nov 02, 2016
    • Carl Lerche's avatar
      Remove default for SliceBuf<T> · 11fe277c
      Carl Lerche authored
      11fe277c
    • Carl Lerche's avatar
      Restructure and trim down the library · 57e84f26
      Carl Lerche authored
      This commit is a significant overhaul of the library in an effort to head
      towards a stable API. The rope implementation as well as a number of buffer
      implementations have been removed from the library and will live at
      https://github.com/carllerche/bytes-more while they incubate.
      
      **Bytes / BytesMut**
      
      `Bytes` is now an atomic ref counted byte slice. As it is contigous, it offers
      a richer API than before.
      
      `BytesMut` is a mutable variant. It is safe by ensuring that it is the only
      handle to a given byte slice.
      
      **AppendBuf -> ByteBuf**
      
      `AppendBuf` has been replaced by `ByteBuf`. The API is not identical, but is
      close enough to be considered a suitable replacement.
      
      **Removed types**
      
      The following types have been removed in favor of living in bytes-more
      
      * RingBuf
      * BlockBuf
      * `Bytes` as a rope implementation
      * ReadExt
      * WriteExt
      57e84f26
  19. Sep 23, 2016
  20. Sep 22, 2016
  21. Sep 20, 2016
  22. Sep 13, 2016
  23. Sep 03, 2016
  24. Aug 31, 2016
  25. Aug 23, 2016
  26. Aug 11, 2016
  27. Aug 10, 2016
    • Carl Lerche's avatar
      Huge overhaul of `bytes` · 04e0ac75
      Carl Lerche authored
      * Get rid of `ByteStr` trait
      * `Bytes` is not a concrete type
      * Add `BlockBuf`
      * Delete lots of cruft
      * Performance work
      04e0ac75
Loading