Forwarded from 🇺🇦 Go performance channel (Oleg Kovalov)
Austin Clements (from #golang team) @GopherCon about runtime changes in 1.14 and what is this loop preemption beast?
https://www.youtube.com/watch?v=1I1WmeSjRSw
PS: Austin's talk is an amazing gift, right before Christmas :D
https://www.youtube.com/watch?v=1I1WmeSjRSw
PS: Austin's talk is an amazing gift, right before Christmas :D
YouTube
GopherCon 2020: Pardon the Interruption: Loop Preemption in Go 1.14 - Austin Clements
Go 1.14 significantly changed how goroutines are preempted for scheduling and garbage collection. Since Go 1.2, the Go runtime has preempted goroutines only at function calls. Most of the time, this let Go developers ignore preemption and focus on writing…
Than McIntosh from #golang team shared shortlink to Go ABI spec go.dev/s/regabi
Found in umbrella issue about runtime https://github.com/golang/go/issues/43930 (please, don't add any comments, everything will be deleted as a spam)
Found in umbrella issue about runtime https://github.com/golang/go/issues/43930 (please, don't add any comments, everything will be deleted as a spam)
🇺🇦 Go performance channel
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
The linux/amd64 version of race runtime is submitted.
Besides removing the goroutine limit, it should also be ~2x-ish faster and consume less memory.
Should be also much more suitable for running e2e systems tests and server canaries (c) @dvyukov https://github.com/golang/go/issues/47056 #golang
Besides removing the goroutine limit, it should also be ~2x-ish faster and consume less memory.
Should be also much more suitable for running e2e systems tests and server canaries (c) @dvyukov https://github.com/golang/go/issues/47056 #golang
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...
🇺🇦 Go performance channel
The linux/amd64 version of race runtime is submitted. Besides removing the goroutine limit, it should also be ~2x-ish faster and consume less memory. Should be also much more suitable for running e2e systems tests and server canaries (c) @dvyukov https://…
Related issue to v3 race detector update https://github.com/golang/go/issues/49761 #golang
GitHub
runtime: upgrade to v3 version of race detector · Issue #49761 · golang/go
See CL 333529 for the upgrade to linux/amd64. This issue is a TODO about updating all the other architectures. @dvyukov
An interesting analysis when #golang Generics can make your code slower? by @planetscaledata
https://planetscale.com/blog/generics-can-make-your-go-code-slower
https://planetscale.com/blog/generics-can-make-your-go-code-slower
Planetscale
Go Generics are a long-awaited feature added in Go 1.18. This article covers how generics were implemented in Go and some surprising ways they can impact your code.
🇺🇦 Go performance channel
Not so small TLDR from the article :D
What a twist! @DoltHub has opposite view on #golang generics: Generics and Value Types in Golang
https://www.dolthub.com/blog/2022-04-01-fast-generics/
https://www.dolthub.com/blog/2022-04-01-fast-generics/
Dolthub
Generics and Value Types in Golang
Blog for DoltHub, a website hosting databases made with Dolt, an open-source version-controlled SQL database with Git-like semantics.
Faster sorting with #golang generics by @elibendersky https://eli.thegreenplace.net/2022/faster-sorting-with-go-generics/
In #golang 1.19 'hash/maphash' package will have Bytes and String funcs for very small inputs, which is much faster than h.Reset+h.Write+h.Sum64 pipeline due to memcopy.
https://github.com/golang/go/commit/9e16cc1541d42cb081d359339e3f45b4b9b2a372
BTW hash algo is wyhash, so it is fast in most cases (see: runwww.tgoop.com/hash64.go)
https://github.com/golang/go/commit/9e16cc1541d42cb081d359339e3f45b4b9b2a372
BTW hash algo is wyhash, so it is fast in most cases (see: runwww.tgoop.com/hash64.go)
GitHub
hash/maphash: add Bytes and String · golang/go@9e16cc1
For very small inputs, h.Reset+h.Write+h.Sum64 is fundamentally
slower than a single operation, by about a factor of two, because
Write must copy the data into h's buffer, just in case ther...
slower than a single operation, by about a factor of two, because
Write must copy the data into h's buffer, just in case ther...
🇺🇦 Go performance channel
In #golang 1.19 'hash/maphash' package will have Bytes and String funcs for very small inputs, which is much faster than h.Reset+h.Write+h.Sum64 pipeline due to memcopy. https://github.com/golang/go/commit/9e16cc1541d42cb081d359339e3f45b4b9b2a372 BTW hash…
Also, what hash functions (read Go packages) do you use?
Have you met a situation where you was forced to change hash algo due to performance or collision problems?
Have you met a situation where you was forced to change hash algo due to performance or collision problems?
🇺🇦 Go performance channel
#golang Developer Survey 2021 Results https://go.dev/blog/survey2021-results
Hi, gophers.
After yesterday's tweet about #golang dev survey results, I think it's a good time to make an open, friendly and easy to access go-perf community thankfully to @github discussions 💕
https://github.com/go-perf/go-perf
I hope that in 1y this will not be a problematic topic 😉
After yesterday's tweet about #golang dev survey results, I think it's a good time to make an open, friendly and easy to access go-perf community thankfully to @github discussions 💕
https://github.com/go-perf/go-perf
I hope that in 1y this will not be a problematic topic 😉
GitHub
GitHub - go-perf/go-perf: Go performance community
Go performance community. Contribute to go-perf/go-perf development by creating an account on GitHub.
🇺🇦 Go performance channel
Hi, gophers. After yesterday's tweet about #golang dev survey results, I think it's a good time to make an open, friendly and easy to access go-perf community thankfully to @github discussions 💕 https://github.com/go-perf/go-perf I hope that in 1y this…
Because community is fresh and empty and someone might be shy to start, feel free to rush to https://github.com/go-perf/go-perf/discussions/categories/show-and-tell and share your project! (with benchmarks 😄)
GitHub
Discussions · Show And Tell · go-perf/go-perf
Go performance community. Contribute to go-perf/go-perf development by creating an account on GitHub.
WOAH @BytedanceTalk proposed pdqsort for #golang 1.19 https://github.com/golang/go/issues/50154
Change: https://github.com/golang/go/commit/72e77a7f41bbf45d466119444307fd3ae996e257
Change: https://github.com/golang/go/commit/72e77a7f41bbf45d466119444307fd3ae996e257
GitHub
sort: use pdqsort · Issue #50154 · golang/go
Abstract From ByteDance Programming Language Team We suggest using pdqsort in the sort package. The new algorithm is mainly based on pattern-defeating quicksort by Orson Peters. Both Rust and C++ B...
🇺🇦 Go performance channel
WOAH @BytedanceTalk proposed pdqsort for #golang 1.19 https://github.com/golang/go/issues/50154 Change: https://github.com/golang/go/commit/72e77a7f41bbf45d466119444307fd3ae996e257
pdqsort author: https://news.ycombinator.com/item?id=31107187
Also a great article by @Danlark1 Changing std:sort at Google’s scale and beyond
https://news.ycombinator.com/item?id=31098822
Also a great article by @Danlark1 Changing std:sort at Google’s scale and beyond
https://news.ycombinator.com/item?id=31098822
By an accident have found a page where you can see all #golang perf-related issue and their progress https://github.com/orgs/golang/projects/8/views/1
As I understand it's a @github feature to have a better view of issues. Might be useful.
(no idea what it's not visible on Golang Projects tab)
As I understand it's a @github feature to have a better view of issues. Might be useful.
(no idea what it's not visible on Golang Projects tab)
GitHub
Go Compiler / Runtime • golang
Go Runtime team project tracking (experimental).
Shaving 40% Off Google’s B-Tree Implementation with #golang Generics by @michalmatczuk @ScyllaDB https://www.scylladb.com/2022/04/27/shaving-40-off-googles-b-tree-implementation-with-go-generics/
ScyllaDB
Shaving 40% Off Google’s B-Tree Implementation with Go Generics - ScyllaDB
Go generics are a new way to improve performance in #golang. Let's see what effect generics had on Google's B-tree implementation.
🇺🇦 Go performance channel
Shaving 40% Off Google’s B-Tree Implementation with #golang Generics by @michalmatczuk @ScyllaDB https://www.scylladb.com/2022/04/27/shaving-40-off-googles-b-tree-implementation-with-go-generics/
GitHub
Generic approach · Issue #41 · google/btree
With support for generics, we can replace interfaces with generic types. The use of generics avoids variables escaping to heap when calling the B-tree functions yielding 20-30% improvement. Below a...