Hacker Newsnew | past | comments | ask | show | jobs | submit | ugorji's commentslogin

Summary:

The go-codec library is a High Performance, Feature-Rich and Idiomatic Go encoding/decoding library for binc, msgpack, cbor, json, with runtime reflection or compile-time code generation support.

About a year ago, we announced go-codec as a library for msgpack. The go-codec library has come a long way since then.


Summary:

go-codec supports compile-time generation of encoders and decoders for named types, which does not incur the overhead of reflection in the typical case, giving 2X-20X performance improvement over the idiomatic runtime introspection mode.

Idiomatic encoding and decoding types within go typically relies on the reflection capabilities of the go runtime. This affords flexible performance without the need for a pre-compilation step; the go types contain all the information needed and the runtime exposes the full types via reflection. However, introspecting the runtime to get this information has a noticeable overhead, which can be eliminated by a pre-compilation/code-generation step.

To eliminate that overhead, a pre-compilation step must be done to create the code which would have been inferred at runtime. This is why Protocol Buffers, Avro, etc have better performance than runtime-based systems. go-codec now provides the same capabilities, with the accompanying 2X-20X performance improvement depending on the size and structure of the named type.

See primer: http://ugorji.net/blog/go-codec-primer


Binc is a lightweight, compact, limitless, schema-free, precise, binary, high-performance, feature-rich, language-independent, multi-domain, extensible, data interchange format for structured data.

See https://github.com/ugorji/binc


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: