On Sat, Nov 24, 2018 at 4:02 PM Ugorji Nwoke <ugo...@gmail.com> wrote:
> I understand the rules from the context of the language and what the compiler will accept - conversion MUST be explicit. I am asking if there is any runtime cost to the conversion between int and uint, > given that they "should" have the same representation, or if it is free. I can see how there is a cost for float64 <-> float32, or for float64 <-> int, but is there a cost for the specific case of int <-> uint? 'floatxx' <-> 'floatyy' <-> 'intzz' is obviously non free. But what possible run-time cost in conversion between 'uint' and 'int' - considering it's always valid and the bit representations have the same shape, size, organization and modulo the sign bit also interpretation - can you think of? -- -j -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.