{"repo":"bufbuild/hyperpb-go","free":true,"listed":false,"github":"https://github.com/bufbuild/hyperpb-go","clone":"git clone https://github.com/bufbuild/hyperpb-go.git","description":"10x faster dynamic Protobuf parsing in Go that’s even 3x faster than generated code.","language":"Go","stars":681,"topics":["grpc","protobuf","protoc","protocol-buffers"],"license":"Apache-2.0","category":"networking-infra","readme_excerpt":"hyperpb hyperpb is a highly optimized dynamic message library for Protobuf or read-only workloads. It is designed to be a drop-in replacement for [ dynamicpb ][dynamicpb], protobuf-go 's canonical solution for working with completely dynamic messages. hyperpb 's parser is an efficient VM for a special instruction set, a variant of table-driven parsing (TDP), pioneered by [the UPB project][upb]. Our parser is very fast, beating dynamicpb by 10x, and often beating protobuf-go 's generated code by a factor of 2-3x, especially for workloads with many nested messages. Here, we show two benchmark variants for hyperpb : out-of-the-box performance with no optimizations turned on, and real-time profile-guided optimization (PGO) with all optimizations we currently offer enabled. These benchmarks are a subset of the ones you can run using make bench . You can read about hyperpb on the Buf blog, or on project lead Miguel's blog. Introducing hyperpb Parsing Protobuf Like Never Before Cheating the Reaper in Go Usage The core conceit of hyperpb is that you must pre-compile a parser using hyperpb.Compile at runtime, much like regular expressions require that you regexp.Compile them. Doing this allows hyperpb to run optimization passes on your message, and delaying it to runtime allows us to continuously improve layout optimizations, without making any source-breaking changes. For example, let's say that we want to compile a parser for some type baked into our binary, and parse some data with","default_branch":null,"files":null,"tree":[],"storefront":"/r/bufbuild","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/bufbuild/hyperpb-go/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}