Speeding up #golang builtin JSON encoder up to 55% for large arrays of objects
by @multiprocessio
https://datastation.multiprocess.io/blog/2022-03-03-improving-go-json-encoding-performance-for-large-arrays-of-objects.html
by @multiprocessio
https://datastation.multiprocess.io/blog/2022-03-03-improving-go-json-encoding-performance-for-large-arrays-of-objects.html
Have found @teivah talk: Mechanical Sympathy in #golang (CC: @GoTurkiye_)
Amazing slides btw!
https://www.youtube.com/watch?v=cetmDfqr2BU
Amazing slides btw!
https://www.youtube.com/watch?v=cetmDfqr2BU
YouTube
Mechanical Sympathy in Go - Teiva Harsanyi - GopherCon Turkey 2020
We, Go Tรผrkiye๐น๐ท, are organizing monthly Go events, workshops, and an annual Go conference named GopherCon Turkey, follow us on Kommunity: https://kommunit...
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...