Hacker News new | ask | show | jobs
by fmstephe 3553 days ago
mappu, do you have a need for 64-bit aligned data?

I would be interested if you did. I have a repo that provides a set of packages for doing things like that. If that is a real need I would be interested to add it to the library.

1 comments

I have a need for quickly aggregating counters across multiple goroutines. `atomic.AddUint64(&central, threadLocal)` works quite well for that, better than pushing to a channel, better than deferring the aggregation until a sync point.

Any needs i have for alignment are derived solely from the requirements of the atomic package.