These are great tips! Thank you! 
This is the context for the code above 
https://github.com/larytet/binlog/blob/master/binlog.go#L548
The following switch has exactly the same performance

    switch arg := arg.(type) {
    case int:
        i := uint64(arg)
        err = writer.write(b.ioWriter, unsafe.Pointer(&i))
    case uint:



-- 
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.

Reply via email to