Re: [go-nuts] Cast from int to uint64 performance cost

2016-10-01 Thread Agniva De Sarker
Thanks ! Appreciate the help. :) On Saturday, 1 October 2016 22:16:10 UTC+5:30, Ian Lance Taylor wrote: > > On Sat, Oct 1, 2016 at 12:24 AM, > > wrote: > > > > I am using a variable to track the no. of bytes written to a file so > far. > > Now the fmt.Fprint command returns the bytes written

Re: [go-nuts] Cast from int to uint64 performance cost

2016-10-01 Thread Ian Lance Taylor
On Sat, Oct 1, 2016 at 12:24 AM, wrote: > > I am using a variable to track the no. of bytes written to a file so far. > Now the fmt.Fprint command returns the bytes written as int. But I am > thinking of storing the value as a uint64 just to give it some extra space. > Therefore, I have to do a b

[go-nuts] Cast from int to uint64 performance cost

2016-10-01 Thread agniva . quicksilver
Hello, I am using a variable to track the no. of bytes written to a file so far. Now the fmt.Fprint command returns the bytes written as int. But I am thinking of storing the value as a uint64 just to give it some extra space. Therefore, I have to do a bytesWritten += uint64(n) to add to the va