Branchless Coding in Go (Golang)

This page summarizes the projects mentioned and recommended in the original post on news.ycombinator.com

Our great sponsors
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • Onboard AI - ChatGPT with full context of any GitHub repo.
  • WorkOS - The modern API for authentication & user identity.
  • rjson

    A fast json parser for go

    I wrote a mostly branchless json parser in go using ragel to generate most of the code.

    https://github.com/WillAbides/rjson

    The code isn't much to look at, but it is certainly fast.

    https://github.com/WillAbides/rjson/blob/main/object_handler...

  • zig

    General-purpose programming language and toolchain for maintaining robust, optimal, and reusable software.

    Sad but true. This is why I'm hopeful that Zig will add support for "constant time" blocks: https://github.com/ziglang/zig/issues/1776

  • InfluxDB

    Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.

  • avo

    Generate x86 Assembly with Go

    You could perhaps just have the Go compiler generate the assembler for your code:

    go tool compile -S file.go > file_amd64.s

    Then you could verify it doesn't change over time, and choose to begin maintaining by hand if it makes sense.

    If you do want to go the route of rolling it yourself, I'd suggest looking into something like Avo: https://github.com/mmcloughlin/avo

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts