1. 29 Aug, 2021 1 commit
  2. 28 Aug, 2021 1 commit
  3. 22 Aug, 2021 1 commit
  4. 12 Aug, 2021 1 commit
  5. 20 Apr, 2021 1 commit
  6. 07 Apr, 2021 1 commit
    • Daniel Martí's avatar
      update go-ipld-prime, use go:generate · 5186aac7
      Daniel Martí authored
      A number of codegen changes have happened recently. Most notably, basic
      types behind a Maybe no longer use pointers, which means far fewer
      allocations in common scenarios.
      
      This results in a nice speed-up for go-merkledag's Roundtrip benchmark:
      
      	name         old time/op    new time/op    delta
      	Roundtrip-8    4.24µs ± 3%    3.78µs ± 0%  -10.87%  (p=0.004 n=6+5)
      
      	name         old alloc/op   new alloc/op   delta
      	Roundtrip-8    6.38kB ± 0%    6.24kB ± 0%   -2.26%  (p=0.002 n=6+6)
      
      	name         old allocs/op  new allocs/op  delta
      	Roundtrip-8       103 ± 0%        61 ± 0%  -40.78%  (p=0.002 n=6+6)
      
      Run gofmt too, as prime's gen does not just yet.
      5186aac7
  7. 30 Mar, 2021 2 commits
    • Daniel Martí's avatar
      decode directly with a []byte · b4150aed
      Daniel Martí authored
      IPLD's codec helper reader has a relatively high cost, unfortunately. It
      was the main contributor to a slowdown in go-merkledag when moving from
      the old protobuf gogo-generated decoder to go-codec-dagpb.
      
      Using a []byte also means we can reuse protobuf's well-optimized "wire
      encoding" helpers, which gets us extra speed and allows removing some
      code.
      
      This should not matter in practice for the time being, as the only
      go-codec-dagpb user is go-merkledag and it uses bytes.Buffer everywhere.
      
      In the future it would be nice for go-codec-dagpb to be just as
      efficient with a stream decoder, but right now I don't have the extra
      week to get into that. Plus, if the core protobuf implementation works
      on []byte, one can assume it's reasonable for us to do the same.
      
      Using the new BenchmarkRoundtrip in go-merkledag with go-codec-dagpb, we
      get a significant uplift in performance:
      
      	name         old time/op    new time/op    delta
      	Roundtrip-8    6.49µs ± 1%    5.34µs ± 1%  -17.74%  (p=0.002 n=6+6)
      
      	name         old alloc/op   new alloc/op   delta
      	Roundtrip-8    8.07kB ± 0%    7.50kB ± 0%   -7.04%  (p=0.002 n=6+6)
      
      	name         old allocs/op  new allocs/op  delta
      	Roundtrip-8       171 ± 0%       148 ± 0%  -13.45%  (p=0.002 n=6+6)
      b4150aed
    • Daniel Martí's avatar
      remove unnecessary xerrors dep · d6e141f2
      Daniel Martí authored
      std's errors has had wrapping for years now.
      d6e141f2
  8. 15 Mar, 2021 1 commit
  9. 08 Mar, 2021 1 commit
  10. 26 Feb, 2021 1 commit
    • Daniel Martí's avatar
      fix the module path · ca0dd481
      Daniel Martí authored
      The module was defined as github.com/ipld/go-codec-dagpb/dagpb, but the
      repository is at github.com/ipld/go-codec-dagpb. This means that neither
      can be resolved as a valid Go package import path; the former results in
      a GitHub 404, and the latter results in a valid GitHub repository which
      holds a different module.
      
      Rod confirmed that the /dagpb suffix wasn't intentional, so just get rid
      of it.
      
      While at it, mod tidy.
      ca0dd481
  11. 01 Jan, 2021 2 commits
  12. 14 Dec, 2020 1 commit
  13. 08 Dec, 2020 2 commits
  14. 07 Dec, 2020 1 commit