This code is ~20% slower (probably) func (b *Binlog) writeArgumentToOutput(writer writer, arg interface{}) error { var err error rv := reflect.ValueOf(arg) var v uint64 if k := rv.Kind(); k >= reflect.Int && k < reflect.Uint { v = uint64(rv.Int()) err = writer.write(b.ioWriter, unsafe.Pointer(&v)) } else if k <= reflect.Uintptr { v = rv.Uint() err = writer.write(b.ioWriter, unsafe.Pointer(&v)) } else { return fmt.Errorf("Unsupported type: %T\n", reflect.TypeOf(arg)) } /* write v */ return err }
-- 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.