┏━━━━━━━━━━━━━━━━━━━━━━━━┓

┗━━━━━━━━━━━━━━━━━━━━━━━━┛
(Possibly) Naïve thoughts regarding Go.

Scheduling Function Calls with Zero Allocation

#Channel #EscapeAnalysis #GUI #MainThread #Thread #Tracing #MemAlloc

Author(s): Changkun Ou

GUI programming in Go is a little bit tricky. The infamous issue regarding interacting with legacy, GUI frameworks is that most graphics related APIs must be called from the main thread. The issue violates the concurrent nature of Go: A goroutine maybe arbitrarily and randomly scheduled or rescheduled on different running threads, i.e., the same piece of code will be called from different threads over time, even without evolving the go keyword.

Read more...

Pointers Might Not Be Ideal for Parameters

#Performance #Parameter #Pointer

Author(s): Changkun Ou

We are aware that using pointers for passing parameters can avoid data copy, which will benefit the performance. Nevertheless, there are always some edge cases we might need concern.

Read more...

Eliminating A Source of Measurement Errors in Benchmarks

#Benchmark #Error #TimeMeasurement

Author(s): Changkun Ou

About six months ago, I did a presentation that talks about how to conduct a reliable benchmark in Go. Recently, I submitted an issue #41641 to the Go project, which is also a subtle issue that you might need to address in some cases.

Read more...
Page 1 of 1