All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
- Improved performance further with a few memory pools at hotspots.
- Better handling of escaped strings.
- Lots of performance enhancements. This is roughly 4x faster and uses 1/8th the number of memory allocations than 0.2.2 does (and about 1/3 the memory).
- API now takes []byte as argument, not io.Reader. This slice must not be mutated until operations (like calling JSON method) on the returned types.Object are completed.
- Python tuples become JSON lists.
- Added types.None, which was missing.
- Make every python object implement types.Object, and types.Object has a JSON() method which emits the equivalent JSON. This necessitated wrapping all the types which were bare Go, like bool, int, string, into named types. In the end, I don't emit JSON directly. I still construct the intermediate python objects, and then ask them to emit. This creates lots of garbage to gc, so I might re-explore directly emitted the JSON as as unpickle.
- forked from nlpodyssey/gopickle (or really, a child of that, nsd20463/gopickle b/c I wanted the improvements there)
- More and better documentation
OrderedDict.MustGet()
Dict.MustGet()
pytorch.LoadWithUnpickler()
which allows loading PyTorch modules using a custom unpickler.- Handle legacy method
torch.nn.backends.thnn._get_thnn_function_backend
when loading pytorch modules.
FrozenSet
implementation was modified, avoiding confusion withSet
.- Replace build CI job with tests and coverage
Dict
has been reimplemented using a slice, instead of a map, because in Go not all types can be map's keys (e.g. slices).- Use Go version
1.15
- Unused method
List.Extend
- Modify GitHub Action steps
Build
andTest
including all sub-packages.
- Initial implementation of
types
package - Initial implementation of
pickle
package - Initial implementation of
pytorch
package