Advent of Go Profiling: Day 1-1: Branchless Go

1 · Felix Geisendörfer · Dec. 2, 2021, 11 p.m.
It seems like my previous post has struck a chord and many of you have sent your own solutions via twitter. Before I move on to pick another day as a challenge, I’d like to do a little follow up for day 1-1. Valentin Deleplace’s Solution Let’s start with looking at the winning solution from Valentin Deleplace which achieves a spectacular 13.8 ns/op on my machine. This is 6.5x faster than my v3 solution and 23x faster than my v1 🤯. func Answer(input string) (int, error) { var prev int64 = -9999 v...