go: github.com/ugorji/go/codec/codecgen Files

Command codecgen

codecgen generates static implementations of the encoder and decoder functions for a given type, bypassing reflection, and giving some performance benefits in terms of wall and cpu time, and memory usage.

Benchmarks (as of Dec 2018) show that codecgen gives about

- for binary formats (cbor, etc): 25% on encoding and 30% on decoding to/from []byte
- for text formats (json, etc): 15% on encoding and 25% on decoding to/from []byte

Note that (as of Dec 2018) codecgen completely ignores

- MissingFielder interface

(if you types implements it, codecgen ignores that)

- decode option PreferArrayOverSlice

(we cannot dynamically create non-static arrays without reflection)

In explicit package terms: codecgen generates codec.Selfer implementations for a set of types.

Package Files

gen.go goversion_pkgpath_gte_go111.go z.go

Package main imports 18 packages (graph). Updated 2019-07-04. Refresh now. Tools for package owners.