|
|
Subscribe / Log in / New account

Go 1.20 released

Version 1.20 of the Go language has been released.

We’re particularly excited to launch a preview of profile-guided optimization (PGO), which enables the compiler to perform application- and workload-specific optimizations based on run-time profile information. Providing a profile to go build enables the compiler to speed up typical applications by around 3–4%, and we expect future releases to benefit even more from PGO. Since this is a preview release of PGO support, we encourage folks to try it out, but there are still rough edges which may preclude production use.

Go 1.20 also includes a handful of language changes, many improvements to tooling and the library, and better overall performance.



to post comments

Go 1.20 released

Posted Feb 1, 2023 22:51 UTC (Wed) by pbonzini (subscriber, #60935) [Link] (10 responses)

Go not using either LLVM or GCC infrastructure is such a great example of Not-Invented-Here syndrome. PGO support would have come for free.

Go 1.20 released

Posted Feb 2, 2023 2:02 UTC (Thu) by wahern (subscriber, #37304) [Link] (2 responses)

Go 1.20 released

Posted Feb 2, 2023 2:22 UTC (Thu) by rahulsundaram (subscriber, #21946) [Link] (1 responses)

> GCC Go is maintained in parallel. See https://gcc.gnu.org/onlinedocs/gccgo/ and https://go.dev/doc/install/gccgo

From the latter page, the last supported release suggests it isn't maintained in parallel anymore.

The GCC 11 releases include a complete implementation of the Go 1.16.3 release."

Granted, the delta between 1.16 and 1.20 isn't huge.

Go 1.20 released

Posted Feb 2, 2023 5:14 UTC (Thu) by wahern (subscriber, #37304) [Link]

I think GCC Go has always lagged behind by several releases. Also, because Go and GCC releases happen completely independently and the cadences are quite different, the Go version gap varies. It looks like GCC Go in the GCC master branch is up to 1.18: https://gcc.gnu.org/git/?p=gcc.git;a=history;f=libgo;hb=HEAD

Go 1.20 released

Posted Feb 2, 2023 4:58 UTC (Thu) by bradfitz (subscriber, #4378) [Link]

See Russ Cox's 2014 answer about this at https://news.ycombinator.com/item?id=8817990

He's the tech lead of the Go project.

Go 1.20 released

Posted Feb 2, 2023 6:58 UTC (Thu) by flussence (guest, #85566) [Link] (4 responses)

I don't think it would have come for free. Things like gcj, gdc and *gccgo* aren't exactly best-in-class, are they? LLVM's platform support hasn't improved one iota since the python cryptography module fiasco either.

Go 1.20 released

Posted Feb 2, 2023 8:33 UTC (Thu) by pbonzini (subscriber, #60935) [Link] (2 responses)

Go's platform support isn't any better than LLVM's, as of a couple of years ago for example it didn't support alpha or sparc.

GCJ was best in class when it was maintained (early 2000s), it just fell behind because features don't add themselves to the compiler; likewise GDC and gccgo aren't best in class because language development happens elsewhere.

Just like C and C++, GNAT *is* a great Ada environment because it is backed by enough money to be great.

Go 1.20 released

Posted Feb 2, 2023 14:07 UTC (Thu) by mathstuf (subscriber, #69389) [Link]

Go also doesn't have PowerPC (32) support (so I can't run `rclone` to sync my backups on the NAS directly and instead have to sling everything via the SMB mounts). But it is 10 years old and is now being replaced with a FreeNAS appliance, so that requirement goes away once I get time to migrate everything over…

Go 1.20 released

Posted Feb 2, 2023 19:06 UTC (Thu) by Cyberax (✭ supporter ✭, #52523) [Link]

> GCJ was best in class when it was maintained (early 2000s)

Sorry, but that has never been true. GCJ had never moved past conservative garbage collection, and its code generation was not comparable even with HotSpot.

Go 1.20 released

Posted Feb 2, 2023 18:53 UTC (Thu) by roc (subscriber, #30627) [Link]

M68K landed in LLVM mainline and patches for ESP32 landed late last year but I don't think it's officially supported yet.

Go 1.20 released

Posted Feb 2, 2023 19:32 UTC (Thu) by Cyberax (✭ supporter ✭, #52523) [Link]

Go's decision to write their own compiler and runtime, on the other hand, resulted in a very tidy self-contained system that is easy to hack.

It also allows them to build truly static binaries, with cross-compilation support. So I can easily build macOS versions of my tools from a Linux-based CI/CD pipeline, by just setting GOARCH and GOOS in the compiler command line.

PGO, yay!

Posted Feb 2, 2023 14:28 UTC (Thu) by davecb (subscriber, #1574) [Link]

In a previous life, My Smarter Colleagues looked at jit as being a bit inclined to "go off half-cocked", and wanted a way to use profiler results to guide it.

Go 1.20 released

Posted Feb 3, 2023 5:59 UTC (Fri) by ringerc (subscriber, #3071) [Link] (1 responses)

I wonder if it'll ever get support for operations features other toolchains have had since the '90s or 2000s, like external debuginfo.

Every go project I deal with has absolutely no concept of debuggable production binaries. Either it's a stripped-to-nothing production build, or a giant dev build with inline DWARF.

Get a coredump from a production service? Obviously, you compile a new build with debuginfo, deploy that, and hope you can reproduce the issue. Right? Because it's not like we've had external debuginfo and debuginfod since forever...

Go 1.20 released

Posted Feb 3, 2023 18:40 UTC (Fri) by Cyberax (✭ supporter ✭, #52523) [Link]

Go does not support building _without_ debuginfo. You can manually strip it, but almost nobody does that.


Copyright © 2023, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds