RSSAmplifier

Blog

barakmich writes

Recent content on barakmich writes

barakmich.devRSS feed ↗2 posts

Latest posts

PopCount on ARM64 in Go Assembler

Apropos of Apple’s ARM announcment, I thought I might write up a post on a recent bit of code I wrote that specifically looks at ARM64, and its benchmarks on various hardware. I’ve been implementing some compact data structures for a project. One of the CPU hotspots for the implementation is the need to run a quick population count across a potentially large bit of memory. If…

Why is my memmove slow?

So I got caught in a bit of a rabbit hole recently. It all started with implementing some compact data structures. Specifically, this meant inserting bytes into a byte slice, usually close to the front. Very close to: array = append ([] byte { 0x00 , 0x00 }, array ... ) This is expensive, of course, if you’re trying to keep the bytes contiguous (say, a fixed block of memory) as it requires a…