Yep that is true. I wanted both values to be comparable for an easy demo but would write it as you've suggested if I intended to make this a general purpose package.
Cool! I'm glad you read my comment. I appreciate that you went through the effort to make a blog post (my comment is very low effort in comparison). I hope it came off as constructive.
This is actually a powerful design pattern in golang. Write first without worrying about bottlenecks. Make sure all tests are ok. And typically concurrent GC is performant enough for average loads.
Then later at our leisure we can optimize with pprof and custom load generator. With bonus points for go-fuzz and throwing in some chaos ;)
But for ARP style table lookups, do you even need to allocate for the response? Are we actually doing any request processing? Can't we just output the cache entry to the net io.Writer, log the event, and continue?