package
0.0.0-20250219193241-03d6137ed8d9
Repository: https://github.com/aclements/go-misc.git
Documentation: pkg.go.dev

# README

This directory contains experiments with varint decoding using hand-coded assembly.

The simple assembly loop is 15–30% faster than the Go loop. The loop is somewhat clever, but in principle the compiler could probably produce this code.

Most of the code experiments with BMI2 instructions. This requires Haswell or newer, which the benchmark will detect. This approach is constant time up to 8 byte varints (56 bit values). It's 50% faster than the Go code for 8 byte varints, but 80% slower for one byte varints.

# Functions

No description provided by the author
No description provided by the author