Re: [go-nuts] Re: is it possible to speed up type assertion?

2018-11-26 Thread Arkady
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*ifac

Re: [go-nuts] Re: is it possible to speed up type assertion?

2018-11-26 Thread Arkady
P.S. shaves 20% from the total execution time. On Mon, Nov 26, 2018 at 10:22 AM wrote: > > The ugly hack below shaves 20% from the switch-case > type iface struct { > tab *unsafe.Pointer > data *unsafe.Pointer > } > > func getInterfaceData(arg interface{}) unsafe.Pointer { > return un