joellubi commented on PR #43206:
URL: https://github.com/apache/arrow/pull/43206#issuecomment-2221290369

   > Does this have any effect on performance at all?
   
   I haven't run formal benchmarks but I would expect the impact to be minimal. 
The implementation of `Int64` is actually pretty simple but interesting:
   
   ```go
   // An Int64 is an atomic int64. The zero value is zero.
   type Int64 struct {
        _ noCopy
        _ align64
        v int64
   }
   
   // Add atomically adds delta to x and returns the new value.
   func (x *Int64) Add(delta int64) (new int64) { return AddInt64(&x.v, delta) }
   ```
   
   So it's actually using the same exact `atomic.AddInt64` function we were 
using before, just with a simple container struct to guarantee alignment rather 
than having to make sure the `int64` is aligned manually in all the structs we 
use it in.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to