UPDATED 12:00 EDT / 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:

Support our open free content by sharing and engaging with our content and community.

Join theCUBE Alumni Trust Network

Where Technology Leaders Connect, Share Intelligence & Create Opportunities

11.4k+  
CUBE Alumni Network
C-level and Technical
Domain Experts
15M+ 
theCUBE
Viewers
Connect with 11,413+ industry leaders from our network of tech and business leaders forming a unique trusted network effect.

SiliconANGLE Media is a recognized leader in digital media innovation serving innovative audiences and brands, bringing together cutting-edge technology, influential content, strategic insights and real-time audience engagement. As the parent company of SiliconANGLE, theCUBE Network, theCUBE Research, CUBE365, theCUBE AI and theCUBE SuperStudios — such as those established in Silicon Valley and the New York Stock Exchange (NYSE) — SiliconANGLE Media operates at the intersection of media, technology, and AI. .

Founded by tech visionaries John Furrier and Dave Vellante, SiliconANGLE Media has built a powerful ecosystem of industry-leading digital media brands, with a reach of 15+ million elite tech professionals. The company’s new, proprietary theCUBE AI Video cloud is breaking ground in audience interaction, leveraging theCUBEai.com neural network to help technology companies make data-driven decisions and stay at the forefront of industry conversations.