UPDATED 12:00 EST / MARCH 15 2022

APPS

Google Go 1.18 release adds dev tools and CPU performance

The Go programming language team at Google Cloud today released Go 1.18, which includes a massive number of performance improvements and features requested by developers.

Go was publicly announced in 2009 by Google as a way to improve programming productivity for multicore, networked machines dealing with large codebases. The language is similar to C, with static typing, meaning that its variables must be defined ahead of time, making it more secure and easier to optimize. Its coding is also designed for readability and usability similar to JavaScript.

Right out of the gate, Go 1.18 is getting central processing unit speed performance boost of up to 20% for Apple M1, ARM64 and PowerPC64 chips. This is all from an expansion of Go 1.17’s calling conventions for the application binary interface on these processor architectures.

The next thing that Go 1.18 has added is the concept of generic support for functions. That’s useful because Go, as a statically typed language, must have all variables defined ahead of time. These defined variables must also happen when they are being passed into functions to be processed. That can become a disadvantage when writing code for processing data, for example producing the sum of an array of types.

Without generics, different functions would need to be written to process each of the different types, be they bytes, integers, floating points or the like. However, with a generic function, it’s now possible to pass data structures in a generic form where all the types can be factored out afterward. As a result, only one function needs to be written to do all the heavy lifting for the developer within. More details are available in the release notes and a tutorial.

Generics came out in the 1.18 preview in December, and the team intends for the design to be fully reverse-compatible. However, as a brand-new language feature, it could still have unexpected or unspecified behaviors or bugs that may need to be addressed down the line that might break compatibility, the team warned.

Another milestone with 1.18 includes the full integration of fuzzing into the Go toolchain. Fuzzing is a type of automated testing that throws random data at the inputs of the program with the intent of crashing it or causing unexpected behavior. The objective of fuzzing is to aid the programmer in discovering potential exploits or edge cases where the code could be vulnerable that could be easily missed through standard testing.

Examples of vulnerabilities that could be detected via fuzzing are SQL code injections, buffer overflows, cross-site scripting attacks and other exploits that attack out of band inputs. More details are also available in the Go 1.18 release notes and there is a tutorial available as well.

Image: Google

A message from John Furrier, co-founder of SiliconANGLE:

Show your support for our mission by joining our Cube Club and Cube Event Community of experts. Join the community that includes Amazon Web Services and Amazon.com CEO Andy Jassy, Dell Technologies founder and CEO Michael Dell, Intel CEO Pat Gelsinger and many more luminaries and experts.

Join Our Community 

Click here to join the free and open Startup Showcase event.

“TheCUBE is part of re:Invent, you know, you guys really are a part of the event and we really appreciate your coming here and I know people appreciate the content you create as well” – Andy Jassy

We really want to hear from you, and we’re looking forward to seeing you at the event and in theCUBE Club.

Click here to join the free and open Startup Showcase event.