1. 10 Jan, 2022 1 commit
  2. 14 Dec, 2021 2 commits
  3. 20 May, 2019 1 commit
  4. 25 Feb, 2019 1 commit
  5. 02 Oct, 2018 1 commit
    • Steven Allen's avatar
      add component/foreach helpers · 58bcbc8e
      Steven Allen authored
      This adds a `Component` helper type and a `ForEach` helper method.
      
      The first attempt used an interface but interfaces imply allocation. We really
      can't afford to allocate here.
      58bcbc8e
  6. 01 Oct, 2018 1 commit
    • Steven Allen's avatar
      stop copying when calling `Bytes` · 61e31ed4
      Steven Allen authored
      This is a huge performance hit. Really, we just need to tell users not to modify
      the result.
      
      Also, get rid of an unnecessary pointer indirection (no api change).
      61e31ed4
  7. 22 Jun, 2018 1 commit
  8. 21 Sep, 2017 2 commits
    • Steven Allen's avatar
      remove debugging code · d8140735
      Steven Allen authored
      no point in slowing things down unnecessarily just for some debugging code.
      d8140735
    • Steven Allen's avatar
      preallocate protocol slice · 6362ccb0
      Steven Allen authored
      This was showing up on CPU profiles as a significant source of repeated
      allocations. We don't really care about over allocation (don't keep these slices
      around) and should rarely have more than 8 protocols in a single address.
      6362ccb0
  9. 19 Sep, 2016 1 commit
  10. 04 May, 2016 1 commit
  11. 29 Apr, 2016 1 commit
  12. 18 Jan, 2016 1 commit
  13. 17 Jan, 2016 1 commit
  14. 20 Jan, 2015 1 commit
  15. 09 Jan, 2015 1 commit
  16. 19 Nov, 2014 1 commit
  17. 05 Nov, 2014 7 commits
  18. 06 Oct, 2014 1 commit
    • Juan Batiz-Benet's avatar
      New Multiaddr interface · c90ef447
      Juan Batiz-Benet authored
      This commit changes the struct to a new Multiaddr interface:
      
      ```Go
      type Multiaddr interface {
        Equal(Multiaddr) bool
        Bytes() []byte
        String() string
        Protocols() []*Protocol
        Encapsulate(Multiaddr) Multiaddr
        Decapsulate(Multiaddr) Multiaddr
      }
      ```
      
      This means a few things have changed:
      
      - use Multiaddr interface, struct not exported
      - Bytes returns a copy of the internal bytes
      - Some methods no longer return errors (catch errors in NewMultiaddr)
        - String (panics if malformed)
        - Protocols (panics if malformed)
        - Decapsulate (no-op if not prefix)
      - Moved net-specific functions to package
        - Multiaddr.DialArgs() -> DialArgs(Multiaddr)
        - Multiaddr.IsThinWaist() -> IsThinWaist(Multiaddr)
      
      cc @whyrusleeping @perfmode
      c90ef447