Profile cover photo
Profile photo
Sthapaun Patinthu
36 followers -
an ordinary geek nerd
an ordinary geek nerd

36 followers
About
Sthapaun's posts

Post has attachment

Post has shared content
go-codec series: code generation to encode/decode json msgpack cbor; 2X-20X perf

Some folks asked me yesterday that it was not clear what code generation referred to with respect to go-codec, so I am posting the article focused on code generation capabilities.

http://ugorji.net/blog/go-codecgen

This is part on the go-codec series.

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.

More Discussion:
http://redd.it/2rrc0y
https://news.ycombinator.com/item?id=8857369

Post has shared content
"The Gopher Gala is the first worldwide Go hackathon"
Learn more about it in our latest blog post.
http://blog.golang.org/gophergala

Post has shared content

Post has shared content

Post has shared content

Post has attachment

Post has attachment

Post has shared content
Ursa

Shot on a workshop I led on Saturday evening. We came across a couple of hundred percebes (goose neck barnacles) clinging to a plastic bottle.
There were a couple of kilos here....and they can sell for around €80 per kilo.
We left them in the ocean.
Photo

Post has shared content
Wait while more posts are being loaded