[go-nuts] cannot take the address of method()

2018-09-23 Thread Tamás Király
Hi, can anyone explain why the following does not work? i want to have the return value's address not the method itself. package main func main() { //first addressofstring := () } func method() string { return "value" } https://play.golang.org/p/UbJ7SK0m9w6 regards Tamás Királ

Re: [go-nuts] performance optimization

2019-01-14 Thread Tamás Király
I'm simulating the internal clock of an embedded microcontroller... And this sentence (and you!) gave the idea to use time.Now(). Thanks! Tamas 9. jan. 14., H 21:12 dátummal Matt Ho ezt írta: > Can you describe what task it is that needs to be updated every > microsecond? It seems like there

Re: [go-nuts] performance optimization

2019-01-14 Thread Tamás Király
to an OS thread and do > busy waiting (and that still won't save you from OS preemption, unless > you're doing something explicit about that too). > > - Dave > > On Mon, Jan 14, 2019 at 12:35 PM Tamás Király wrote: > >> I'm simulating the internal clock of an embedded microc

Re: [go-nuts] Re: performance optimization

2018-12-20 Thread Tamás Király
the implementation with time.Ticker for me use stably under 20% CPU, i guess this is the best i can get without syscall or CGO magic https://play.golang.org/p/Q5BMpr6zCEF interesting fact that for me time.Sleep was the least performant while github issue states the opposite Robert Engels ezt

[go-nuts] performance optimization

2018-12-19 Thread Tamás Király
this is 30%-40% of CPU usage. Can anyone optimize more this code so it does not use a hilariously lot of CPU? regards Tamás Király -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving e