go-hamt-ipld
go-hamt-ipld copied to clipboard
use generic pointers
~It sucks, but, as far as I know, this is the only way to avoid reflection and other pointy nastiness.~
After applying @Wondertan, it's less terrible.
See https://medium.com/@reetas/using-generics-with-pointer-receivers-in-go-39ee237d7475
I've pulled this in to rvagg/generics and made some additional modifications, including creating and holding the zero value on the Node and its children instead of making a new one every time we pass through modifyValue(). (Although, I can't say I measured a huge perf difference when doing this in https://github.com/filecoin-project/go-state-types/pull/298).