🇺🇦 Go performance channel
https://twitter.com/go_perf/status/1438933426946588678
Twitter
Ignacio Hagopian
Two low-hanging fruit optimizations in strings.Replace that allows double-digit speedup and memory saving in the existing reference benchmark. #golang #performance go-review.googlesource.com/c/go/+/343089
A 5x reduction in RAM usage with Zoekt memory
optimizations #golang by @sourcegraph
Cut 64-bit ngrams in two is an interesting trick but not so many places where you can apply it.
https://about.sourcegraph.com/blog/zoekt-memory-optimizations-for-sourcegraph-cloud/
optimizations #golang by @sourcegraph
Cut 64-bit ngrams in two is an interesting trick but not so many places where you can apply it.
https://about.sourcegraph.com/blog/zoekt-memory-optimizations-for-sourcegraph-cloud/
Sourcegraph
A 5x reduction in RAM usage with Zoekt memory optimizations
Here’s how we went from using 1400KB of RAM per repo to just 310KB without affecting latency.
There was an issue with a heavy #golang contexts (more than 12 or even 50) because iteration over context was done recursively.
https://github.com/golang/go/issues/47292
The good news it's fixed via iterative approach https://github.com/golang/go/commit/afe43f1e5e0d256341689195454527726b26ccae
The problem is rare but better not to have it at all.
https://github.com/golang/go/issues/47292
The good news it's fixed via iterative approach https://github.com/golang/go/commit/afe43f1e5e0d256341689195454527726b26ccae
The problem is rare but better not to have it at all.
GitHub
context: recursive implementation of Context.Value triggers stack resize · Issue #47292 · golang/go
As discussed in #33283, Go's implementation or valueCtx.Value is recursive which means that the cost grows linearly with the depth of the context chain. But one issue not discussed there is tha...
https://philpearl.github.io/post/perf_www.tgoop.com/
twitter.com/philpearl wrote a new great post! Check how to optimise #golang time parsing.
twitter.com/philpearl wrote a new great post! Check how to optimise #golang time parsing.
philpearl.github.io
Faster time parsing · Phil Pearl's Blog
A story in 3 acts
Yet another story how #golang compiler and runtime is hacked @Tailscale
Take a minute to read the philosophy regarding software development, it is deep.
https://tailscale.com/blog/go-linker/ by twitter.com/commaok
Take a minute to read the philosophy regarding software development, it is deep.
https://tailscale.com/blog/go-linker/ by twitter.com/commaok
Tailscale
Hey linker, can you spare a meg?
Tailscale on iOS runs as a special kind of app, a Network Extension. This lets us run in the background, so we can secure traffic from all of your applications, without them having to change anything. But with this power comes a memory straightjacket. Normal…
It's too early to say something but there is a chance that feedback-guided optimization will happen in #golang 1.19! What a time to be alive!
https://github.com/golang/go/issues/28262
https://github.com/golang/go/issues/28262
GitHub
cmd/compile: feedback-guided optimization · Issue #28262 · golang/go
This is an umbrella issue for supporting feedback-guided optimization. This has been discussed offhand in a few other contexts (inlining decisions: #17566, code layout decisions: #20356, language c...
Very nice trick for @code #golang users to see what is escaped to the heap or not inlined.
In most cases you don't need to see this all the time but nice thing to have in your toolbox.
CC: @GoLandIDE
https://twitter.com/_josephwoodward/status/1455522831190663173
In most cases you don't need to see this all the time but nice thing to have in your toolbox.
CC: @GoLandIDE
https://twitter.com/_josephwoodward/status/1455522831190663173
Twitter
Joseph Woodward
@felixge I know VS Code enables you to run > "Go: Toggle gc details" to see some more details, but nothing like this - though it would be cool!
Best #golang release ever (again?). Check replies for more details!
https://twitter.com/mvdan_/status/1456947756925399040
https://twitter.com/mvdan_/status/1456947756925399040
Twitter
Daniel Martí
Here's a list of some changes to look forward to in #golang 1.18! The first beta should be out in a month, and the final release in three months. Each change with a link, so you can read more.
As always @commaok has something to propose!
And today's topic out of order execution for math operations in #golang
https://github.com/golang/go/issues/49331
And today's topic out of order execution for math operations in #golang
https://github.com/golang/go/issues/49331
GitHub
cmd/compile: reorganize associative computation to allow superscalar execution · Issue #49331 · golang/go
The compiler currently compiles a+b+c+d as a+(b+(c+d)). It should use (a+b)+(c+d) instead, because the latter can be executed out of order. More broadly, we should balance trees of associative comp...
Not a technical tweet, sorry. But important for the #golang community. Thank you @mvdan_
I also hope that https://github.com/golang/go/issues/43930 will be back on track too.
https://github.com/golang/go/issues/28262#issuecomment-975416122
I also hope that https://github.com/golang/go/issues/43930 will be back on track too.
https://github.com/golang/go/issues/28262#issuecomment-975416122
GitHub
Go compiler and runtime meeting notes · Issue #43930 · golang/go
Google's Go compiler and runtime team meets periodically (roughly weekly) to discuss ongoing development of the compiler and runtime. While not open to the public, there's been desire by th...
> The missing cases (range loops and loops with labeled breaks/continues) are now inlineable, so all for loops are now inlineable.
One more reason to try #golang 1.18 as far as first release candidate will be published. https://github.com/golang/go/issues/14768#issuecomment-981759381
One more reason to try #golang 1.18 as far as first release candidate will be published. https://github.com/golang/go/issues/14768#issuecomment-981759381
GitHub
cmd/compile: for-loops cannot be inlined · Issue #14768 · golang/go
Using go devel +ed4a27a Currently, functions with for-loops are not inline-able, would be nice if they did. Not long ago, I used a non-idiomatic goto in order to cheat around the inliner. @dr2chase
Unpopular opinion: this #golang CL is better then generics https://go-review.googlesource.com/c/go/+/333529/
Related issue https://github.com/golang/go/issues/47056
Super kudos for @dvyukov and @llvmorg team
Related issue https://github.com/golang/go/issues/47056
Super kudos for @dvyukov and @llvmorg team
GitHub
testing: provide a way to work around "race: limit on 8128 simultaneously alive goroutines is exceeded" error · Issue #47056 ·…
$ go version go version devel go1.17-dc00dc6c6b Thu Jun 10 12:41:37 2021 +0000 linux/amd64 Issue #38184 seems to be a reasonably hard limit in the race detector library, but it's not always...
#golang GC tuning by UberEng
https://eng.uber.com/how-we-saved-70k-cores-across-30-mission-critical-services/
https://eng.uber.com/how-we-saved-70k-cores-across-30-mission-critical-services/
Aaaaand after somewhat heated discussions in chats upcoming #golang generics will not allocate interfaces. But looks like this will be available only in Go 1.19...
issue https://github.com/golang/go/issues/50182 and fix https://go-review.googlesource.com/c/go/+/378178/
issue https://github.com/golang/go/issues/50182 and fix https://go-review.googlesource.com/c/go/+/378178/
GitHub
cmd/compile: generic functions are significantly slower than identical non-generic functions in some cases · Issue #50182 · golang/go
What version of Go are you using (go version)? $ go version go version go1.18beta1 windows/amd64 Does this issue reproduce with the latest release? It reproduces on the 1.18 Beta 1 release. What op...