Jan,

I have just measured overall performance of my code - call to Log(string, 
args []interface{}). 
This code makes the difference 

type iface struct {
    tab  *unsafe.Pointer
    data *unsafe.Pointer
}

func getInterfaceData(arg interface{}) unsafe.Pointer {
    return unsafe.Pointer((((*iface)(unsafe.Pointer(&arg))).data))
}

func (b *Binlog) writeArgumentToOutput(writer writer, arg interface{}) 
error {
    // unsafe pointer to the data depends on the data type
    var err error
    err = writer.write(b.ioWriter, getInterfaceData(arg))
    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.

Reply via email to